Definitely possible, and this is a very interesting idea as I was
thinking of ways to make the current painters more generic and
extendable. You could code this up pretty quickly, you would just need
to modify the Timeline.OriginalEventPainter in original-painter.js,
specifically the paintPrecise* and paintImprecise* methods. If you
decide to do this please do contribute your code back to the
repository.
> 2. Can I change the default behaviour for Clicks on Events? So it
> doesn't open the bubble but calls a js function for example ...
Yes, the event registration for clicks occurs in the previously
mentioned methods.
-David
this._frc = SimileAjax.Graphics.getFontRenderingContext(eventLabelPrototype);
It is all defined in the ajax apis in graphics.js. Essentially all it
does is actually inserts the element into a track (hidden), and
extracts its actual width and height when its in the page, and returns
that so it can be placed into a track. You should be able to use it
unmodified, although you may need to wrap a div around your content
because it takes one parent element as an argument, this would allow
you to not need to specify width and height beforetime, which would be
terribly inaccurate anyway.
> And for the other issue I had, how can I prevent the Bubble from
> opening altogether without doing strange things in the api source ..
> Currently I use the onSelect event, but that is fired after the bubble
> is opened, so it flickers through.
I believe the bubble is shown by default on every click to an event
and there isn't currently an override option.. you would need to
subclass the painter or override the following methods:
Timeline.OriginalEventPainter.prototype._onClickInstantEvent
Timeline.OriginalEventPainter.prototype._onClickDurationEvent
>
> This really is a neat and solid piece of work, would be so great if
> there was more noob documentation and you don't have to discover all
> the goodies in the code.
The wiki has some pretty good documentation, however I'm not sure how
up to date it is with the current code in the repository.
>
> Btw. I'm working with the Wordpress Plugin from Tim Isenheim (http://
> www.freshlabs.de/journal/archives/2006/10/wordpress-plugin-simile-timeline/)
> and am now able to have full exerpts of blog entries directly on the
> timeline, with the above mentioned limitations of course. I will try
> to make it clean enough for a commit if I should handle it ...
Great.. feel free to send me a patch at some point if you'd like and I
can take a look.
-David