- From: Jeremie Patonnier <jeremie.patonnier@gmail.com>
- Date: Tue, 18 Nov 2014 17:43:38 +0100
- To: Jonathan Moore <moore@eds.org>
- Cc: "public-fx@w3.org" <public-fx@w3.org>
- Message-ID: <CAEi838kN-pW2trqcb5gz37ZHXOYP_-J8P1XE2F45B3tPurjxrQ@mail.gmail.com>
Hi! I wonder if you could just pause the animation rather than cancel it http://w3c.github.io/web-animations/#the-animationplayer-interface define a pause method Note sure it is already implemented but it looks like what you are looking for: http://w3c.github.io/web-animations/#pause-a-player Best, Jeremie 2014-11-18 2:04 GMT+01:00 Jonathan Moore <moore@eds.org>: > I am attempting to add web animation support my animation library Artifact: > > https://bitbucket.org/0x0000/artifact > > The approach if the library is to have the user only specify how they want > to change the dom. It is then up to the library to compute a animation from > the current dome state to the final state. This is similar in nature to CSS > transitions but more flexible and also supports layout changes. > > A requirement of the library is that I can remove the effects of a running > animation, inspect an element's styles, and then restart the animation > where it left off. This has proven difficult with the web animation api as > it is implemented in chrome 39. Do do so I have to save the > player.currentTime, cancel the animation, and restart it and > set currentTime. This is ok but does not work reliably sometimes things > like element.getBoundingClientRect( ) don't reflect the changes due to > canceling the animation. Once this promise API is implemented will that > resolve this issue? > > Even if the promises api can solve the issue, what I would really like is > an api to just put the animation on hold and force a recompute style > serially. I would then like to restart the animation. I would like this to > not cause any for the promises for the animation to resolve. > > -Jonathan > -- Jeremie ............................. Web : http://jeremie.patonnier.net Twitter : @JeremiePat <http://twitter.com/JeremiePat>
Received on Tuesday, 18 November 2014 16:44:45 UTC