[Xerte] Re: _ytile issue

Julian Tenney Julian.Tenney at nottingham.ac.uk
Wed Apr 25 17:26:48 BST 2012


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20120425/bce0a877/attachment.html>


More information about the Xerte mailing list