Output table not varying?
Howdy!
I have a table of weapons where every weapon is coming out with two lines, when the notes portal should be multiline and make each weapon a different height: Code:
<!-- zWeapon portal Code:
<portal Code:
<position><![CDATA[ Thoughts, suggestions? THanks! TC |
1 Attachment(s)
I did find a workaround with the positioning, but it seems crude:
Code:
var myLength as number |
Try setting the width that the portal is allowed before the autoheight command - it'll probably be something simple like
Code:
portal[notes].width = width |
Thanks Mathias, I’ll try that when I get a chance.
|
Mathias,
Thanks! That worked just fine. I’ll keep that in mind going forward. TC |
I was thinking about the details, and I realized what happened, and I wanted to explain that in case anyone looks up this thread in the future. When HL creates a text portal, the initial width of that portal is just enough to fit the text in that portal, but it doesn't try to multiline that text, even on a multiline field. So what would happen is that initially, the width of the portal is set to a very wide amount, probably wider than the space this template is fitting into on the character sheet. So, when you just told it to auto-height it, it checked whether the text needed to wrap, found it didn't, and set the height of that portal to the height needed to show a single line of text (which is the same value it was at before the autoheight). Once the width was set to the right amount, then when it checked where the text needed to wrap in the multiline, it found the wrapping you expected it to have and it calculated the right height to display all the lines that are needed.
|
Thank you Mathias.
That definitely helps understand what was going on. I’ll better know what to look for when come across something similar. Does this process only apply regarding the output portals or is it a similar situation for UI portals as well? |
It's a general thing - portals are given their own default sizes, based on their contents, which is independent of the template they're being displayed in, which means you can end up with situations where a portal is wider than can actually be displayed.
|
All times are GMT -8. The time now is 07:01 AM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.