<div>Hello Inge,<br></div><div><br></div><div>If you look at the model file you will see that there is a decision icon offering two pages.</div><div><br></div><div>The first page has a text icon which has a width set to 550, the second page has a component icon.</div>
<div><br></div><div>Above the decision icon is a script. In the script a path variable is set to 1 if subsuper is true and 0 otherwise.</div><div><br></div><div>Since the decision icon branch property is set to calculate, the decision icon will display the page indexed by the path property i.e. the page with text if path is 0 and the page with the component if path is set to 1.</div>
<div><br></div><div>If you have added and checked the Superscript Support optional property then the text will be displayed in the swf called by the component and any textWidth setting will be ignored. </div><div><br></div>
<div>If you have not checked the text width property then the Decision icon will display the page with the Text Icon</div><div><br></div><div>In your getPageID script there should be the following block of code</div><div>
<br></div><div>if (pageIcon.templateData.text[0].textWidth != undefined){<br>// icon.nextSibling.attributes.w = pageIcon.templateData.text[0].textWidth;<br> // added to directly set the width of the text display<br> icon.nextSibling.firstChild.firstChild.attributes.w = pageIcon.templateData.text[0].textWidth; <br>
}<br></div><div><br></div><div>The commented out line that starts </div><div><br></div><div>//icon.nextSibling </div><div><br></div><div>is the original line that used to set the width of the text icon but this was compromised by the addition to the script of the Decision icon to accommodate handling Superscript by use of a swf.</div>
<div><br></div><div>The following line was added to provide the correct relative path to the text icon in its new position inside the decision, to set its text width. </div><div><br></div><div>
icon.nextSibling.firstChild.firstChild.attributes.w = pageIcon.templateData.text[0].textWidth;
</div><div><br></div><div> If your model file lacks this line (I believe it is included in Xerte 2.17) then the textWidth property will fail to get its width set correctly. </div><div><br></div><div>Whist the xwd file displays text values to the user e.g. Small, Medium, Large, Full the data returned by the xwd is a number 300,450,600,760.</div>
<div><br></div><div>So in a nutshell, the xwd returns a number and the line icon.nextSibling.firstChild etc. sets the width value of the text icon. But this will be irrelevant if you check the Support Superscript box, or if your model file lacks the correction to the relative path to the textIcon.</div>
<div><br></div><div>I hope this sorts it out for you.</div><div><br></div><div>Kind regards</div><div><br></div><div>Johnathan</div><div><br></div><div class="gmail_quote">On 11 December 2011 13:52, Inge Donkervoort <span dir="ltr"><<a href="mailto:i.donkervoort@tor.nl">i.donkervoort@tor.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000066">
Hi,<br>
<br>
The optional parameter 'Text Width' of the Plain Text Page Template
doesn't work. I looked in the model file and the width of the text
box is set to 550. How is this suppost to work?<br>
<br>
Bye, <br>
Inge<br>
<br>
<div><font face="Arial" size="+1"><font color="#a0cf67">1</font><font color="#00aeef"> 2</font><font color="#d71720"> Change</font></font><br>
<font face="Arial" size="-1">Chopinlaan 27<br>
5242 HM Rosmalen<br>
T 073-5226195<br>
F 073-5226196<br>
E <a href="mailto:i.donkervoort@12change.eu" target="_blank">i.donkervoort@12change.eu</a><br>
I <a href="http://www.12change.eu" target="_blank">www.12change.eu</a> <br>
<br>
T <a href="http://twitter.com/IngeDonke12C" target="_blank">twitter</a><br>
L <a href="http://nl.linkedin.com/pub/inge-donkervoort/7/4b/18a" target="_blank">linkedIn</a></font></div>
<br>
<blockquote type="cite">
</blockquote>
<br>
<p>
This message and any attachment are intended solely for the addressee and may
contain confidential information. If you have received this message in error,
please send it back to me, and immediately delete it. Please do not use,
copy or disclose the information contained in this message or in any attachment.
Any views or opinions expressed by the author of this email do not necessarily
reflect the views of the University of Nottingham.
</p>
<p>
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
</p>
</div>
<br>_______________________________________________<br>
Xerte mailing list<br>
<a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><br>
<br>
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.<br>
<br>
This message has been checked for viruses but the contents of an attachment<br>
may still contain software viruses which could damage your computer system:<br>
you are advised to perform your own checks. Email communications with the<br>
University of Nottingham may be monitored as permitted by UK legislation.<br>
<br>
<br></blockquote></div><br>