|
Timeline_Moving_the_Timeline_via_Javascript
JS methods for moving the Timeline
IntroductionThe user can move the Timeline via dragging the Timeline with the mouse, using the mouse-wheel, arrow keys, etc. In addition, you can add HTML controls to your page that will move the Timelins to specific dates. DetailsBands provide three methods for moving their Timeline. Any other bands will move too, if they are connected to the band that you're moving. The methods are:
Examplestl.getBand(0).setCenterVisibleDate(Timeline.DateTime.parseGregorianDateTime(date)) Example PageSee the date anchor elements (1 AD, 250 AD, etc) at the top of the Religion Timelines example. Source: http://simile-widgets.googlecode.com/svn/timeline/trunk/src/webapp/examples/religions/religions.html |
Sign in to add a comment
How do I center the timeline by clicking on a link?
ctitus12, you'd have to pass the information for the specific date that you'll be centering too.
maybe some javascript like:
timeline = document.getElementById('yourTimeline');
function moveTo(date) {
}and then in your link you could have something like:
<a href="#" onclick="moveTo('250 AD'); return false">Jump to 250 AD</a>
Hope that answers your question!
you'll have to check what the format of the date you're jumping too, I'm not sure which format you'll need.
I'd check their example here.
Does this work with exhbit as well? How can I define two diffrent Timelinevews with different Centers? For Example to show the art history of different Eras with differnt Scales and colorcoders. Perhaps you can helb me with this http://swiki.hfbk-hamburg.de:8888/seminare/uploads/156/Zeitstrahl_Kunstgeschichte2.1.html exhibit
Is it possible to get the start and end visible date? Is there a band_object.getMinVisibleDate() function available for instance? Thanks in advance.
Yes we can! The answer is here : http://code.google.com/p/simile-widgets/wiki/Timeline_BandClass
Hello!
Very cool library you do!
My questions are: 1. Is there any standard way to add/delete events one by one? I have to write a work around to make this possible by accessing private objects methods and fields (thanks to javascript)?
2. How can I drag events along the timeline (at least horizontally) to change its start dates?
Thanks a lot in advance!
Does anyone know how to animate the timeline to a given date? That is, the user clicks on a link (as described above) and the timeline slides to arrive at the given date?
Instead of using the setCenterVisibleDate() function, you have to use scrollToCenter().