That's the way the Timeline renderer works - Bands are drawn on div's that are 
5x the width of the Timeline container, and when you drag, it is simply moving 
the band within that container. Once it reaches 1.5x the distance to either 
end, the code will recenter the band div and do a complete layout. This is to 
keep the actual number of event objects (divs, icons, labels, etc) that need to 
be created down to a more manageable size. 

You will find this code by looking in /api/scripts/band.js and looking in the 
Timeline._Band.prototype._moveEther function. When it detects it is nearing the 
end of the Band div, it calls _recenterDiv(), which in turn calls layout().

You can have your changes re-applied by adding a listener for the 'paintEnded' 
event fired when it is done with the new layout and event item creation. 

The better way to handle this is to write your own renderer that adds the DOM 
modifications during the layout and painting of the events, rather than 
applying them after the fact. This is not hard to do, and will make it easier 
for you to maintain your code, rather than trying to mess with the default 
behavior of Timeline. 


--Mike





On Mar 9, 2012, at 12:30 PM, Zach wrote:

> I do a bunch of DOM modifications after the timeline is displayed,
> like injecting a div into every label to add functionality. It works
> fine, but my changes are consistently wiped out after dragging the
> timeline approximately 1.5 screen widths in either direction. I think
> SIMILE must be doing some internal refresh. Is there a way I can
> intercept this so I can reapply my DOM modifications?
> 
> -- 
> 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.
> 

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

Reply via email to