Javascript setters callback


(Hans-Gerd Claßen) #1

Would be great to have builtin kind of callback within the setter-API to call a named function when animation has finished

setElementProperty(dsa,dsdsa,dsa,da,sa, myfunction)


#2

second that


(Jonathan Deutsch) #3

Thanks, I’ve filed this in our tracker.

There are two workarounds you could do:

  1. Use window.setTimeout() for the duration of the transition, though this may be 100% time accurate
  2. Register as a listener for the HypeTimelineComplete callback. If you are only running this timeline, then you’d know it is complete. Otherwise the format for the timelineName entry in the event is a combination of the elementID and a property identifier, but this is currently more of an implementation detail.

(Hans-Gerd Claßen) #4

it seems to change while working on a hypefile … ¿! so how can i get a relyable timelineName?


(Jonathan Deutsch) #5

Oh sorry, I read the code slightly wrong - instead of using the element’s DOM ID it uses an internal representation. In this case you probably can’t.


(Hans-Gerd Claßen) #6

:slight_smile:

Post must be at least 5 characters