Dummy Talk

Our layer creation statements are all included in the itemSetup() function. With the font family fix, the link tag deletions and the new child layer routines, the Navigator-specific part of itemSetup() looks like this:

There are two groups of new statements, creating and styling the child text layer and the child dummy layer, respectively. One statement, defining the clip.bottom (i.e. the height) of the item itself has been moved to after the text layer statements.

The text layer is created as a child layer of the item. The new Layer() constructor creates a wrapping width for the text layer that is equal to the item's width minus padding. The layer is then assigned to the txtLyr property of the item, for easy reference later:

Finally the text layer's visibility is set to inherit, so that it will be either visible or hidden depending on its parent's visibility:

this.txtLyr.visibility = "inherit";

Now that we have some text in the text layer, we can measure the text layer's height and clip the full item layer's height accordingly. This statement has been moved here, because it must be executed after the text layer receives content:

this.clip.bottom += this.txtLyr.document.height + itemPad;

The dummy layer is created in the same way, as a child of the item layer, and assigned to the item's dummyLyr property. Its wrapping width is irrelevant, since there is no content to wrap. We've used 100, which is itself a dummy value.

this.dummyLyr = new Layer(100,this);

Once created, the dummy layer is positioned at the physical top-left of the item. Recall that items have negative clipping values for top and left to account for padding, and their real top and left are lower and to the right of what we see on the screen.