I have a timeline with six bands, and I draw a PointHighlightDecorator
across all of the bands at the current time at startup. What I would
like to do is have this decorator move along with the current time.
I have set up a timer that fires every second, and then a new
PointHighlightDecorator gets drawn on the timeline. The problem is
that I cannot remove the old one. Here is my code so far (that doesn't
work):
<code>
for ( var i=0; i < tl._bands.length; i++ )
{
//var numdecorators = tl._bands[i]._decorators.length;
tl._bands[i]._decorators[0] = null; // memory leak?? Want to
erase
the old one.
var newdecorator = new Timeline.PointHighlightDecorator({
date:
Timeline.DateTime.parseGregorianDateTime(date = new
Date()),
color: "#993300",
opacity: 50
});
tl._bands[i]._decorators[0] = newdecorator;
newdecorator.initialize(tl._bands[i], tl);
}
tl.layout();
</code>
I do not know how to safely remove decorators from a band. Nulling
them out does not remove them from the timeline once they've been
drawn.
Thanks for any inputs!
--Trudy
--
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en.