On Jan 10, 2014, at 2:40 PM, Larry Stice wrote:

> 
> How do I change the order from top to bottom of event lines within a lane in 
> Timeline? Where in the code does it decide what order to put them in? 
> 
> 

You'll want to look at the painter file you are using for your timeline. For 
example, if you are using original-painter.js, you'll see there are calls to a 
method called _findFreeTrack. This is the method that looks to see which 
'track' within a Band will fit the event being painted. It does this by 
checking to see if the event itself has a specified trackNum value. If it does, 
it uses that. If not, it checks to see if the edge pixel of the event overlaps 
with the previous event. If it does, then it knows to move the event down one 
track. If not, then it can use the same track. 

So you can provide your own trackNum values in the events themselves (usually 
not recommended because it can lead to events being painted on top of one 
another) or you can come up with alternate algorithms for selecting track nums 
for your events. 

The default iterator is a reverse iterator - that is Timeline will attempt to 
paint the events in reverse order (newest event first). This is why the stair 
step display of events tends to go from top right to lower left. With a little 
coding, you can change this to paint oldest events first instead. 

--Mike Nosal

-- 
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/simile-widgets.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to