I changed my search terms a bit and found a previous post from 2008 asking the same question. We are on Timeline v2.3.1.
"This is possible, but complicated. Take a look in http://static.simile.mit.edu/timeline/api-2.0/scripts/original-painte... there is a method called "Timeline.OriginalEventPainter.prototype.softPaint" which is empty right now. This method is called every time the timeline is scrolled (even during the panning operation before the mouse button is released). What you will have to do is to re-position the event labels in this method. This requires you to keep references to the HTML elements generated in the Timeline.OriginalEventPainter.prototype.paint function to display the event labels. " Is this still the reasonable approach given the newer version of Timeline? Thanks, Jeff On Aug 31, 3:15 pm, codebeneath <[email protected]> wrote: > For long events that extend left and right of the visible timeline, we > would like to shift the event label to the leftmost visible edge on > the timeline. In this way, there would never be an event whose label > is not visible. Is this a "problem" with a solution already? > > If not, my idea would be to either: > 1) add a listener to Timeline._Band.prototype.addOnScrollListener() > and when scrolling stops, find all visible events (is there a function > for this?) and shift event labels to the right if necessary. > 2) a previous post made me think the event painter may already know > which events are visible and draws the labels as necessary. maybe I > can tap into that to shift the label x position? > > Jeff -- 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.
