Javascript setters callback

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)

3 Likes

second that

1 Like

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.

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

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.

:slight_smile:

Post must be at least 5 characters