[Xerte] Re: _ytile issue

Julian Tenney Julian.Tenney at nottingham.ac.uk
Wed Apr 25 17:41:51 BST 2012


Are the iamges of any particular size? Do you know up front how big the icons will be? Presumably not.

You can do this:

Hang a proto page off a decision icon set to loop and not erase. In the page:

IMG //id= img
TEXT //if needed
INT
  EVT //onLoad, set to exit
    SCR //do your stuff here - colour, keep track of the y coord.

And then dupe the page for as many images as you're loading. You can re-use the 'img' id, no need to set  'em.


From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 25 April 2012 17:34
To: Xerte list
Subject: [Xerte] Re: _ytile issue

Thanks Jules, suspected as much.
I guess I could move the _ytile to where I set the colour, as that seems to be measuring correctly.
But that means assigning id's to stuff. :-/

I'll see if there is a dirtier workaround in the html.

________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Wed, 25 Apr 2012 17:26:48 +0100
Subject: [Xerte] Re: _ytile issue
The image hasn't loaded when _ytile is used, so it only measures the height of the text field.

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 25 April 2012 13:50
To: Xerte list
Subject: [Xerte] _ytile issue


I'm duplicating and then setting properties on some text icons.

The icons have a y property of _ytile+25.
Works as expected when there is simple text set in the node.

But if I add an image to that text:
icon.nextSibling.childNodes[0].childNodes[i].firstChild.nodeValue = '<img src="common/lucio.jpg"/><b>' + colone_array[i]+ '</b>';

it no longer tiles correctly. They overlap as if the plain text is still being used as the _ytile registration point.

The odd thing is that following the setup of those icons, I colour the text background:
icon.parentNode.childNodes[i].clip().txt.backgroundColor= 0xFFF8C6;

It sets up correctly. e.g. it is correctly seeing the graphic as part of the .txt object and colours the area holding both text and image.

So _ytile is not seeing the y extent of the object but clip() is?

Dave


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.
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.

_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte 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. 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20120425/ecfced74/attachment.html>


More information about the Xerte mailing list