Post animation event in visjs Timeline?

215 views
Skip to first unread message

Dan Tulovsky

unread,
Oct 11, 2014, 11:24:26 AM10/11/14
to chap-link...@googlegroups.com
Hi.

(Is there a dedicated groups for visjs?)

but for visjs.  Can I somehow know in the code when the timeline has finished drawing/animating/moving view?

Or perhaps there is a better way to do what I want. I am trying to apply per item CSS styles.  So I set a 'className' property for each item that is unique. Then I iterate over all the items, and try to set their style property in javascript.

The problem I am running into, is that items not on the screen don't seem to exist in the DOM, so I can't get them:  

var myEvent = goog.dom.getElementByClass(className)

comes back null for elements on the screen. 

If I can call the code after the timeline has finished moving its view port to include the items loaded, then it will work.  (If I set the start and end timeline option to something very large, the all CSS gets applied properly. But that's not a good solution obviously.)

Thank you
Dan

Dan Tulovsky

unread,
Oct 11, 2014, 11:39:35 AM10/11/14
to chap-link...@googlegroups.com
I found the github issue tracker and posted this there.
Reply all
Reply to author
Forward
0 new messages