W3C home > Mailing lists > Public > public-fx@w3.org > October to December 2014

Re: Temporary removal of animations

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 18 Nov 2014 11:32:47 -0800
Message-ID: <CAAWBYDA0OvGB--cxn98akdy_0FZQYAE-HbHWW2JqHVtzO_1+Zg@mail.gmail.com>
To: Jonathan Moore <moore@eds.org>
Cc: "public-fx@w3.org" <public-fx@w3.org>
On Tue, Nov 18, 2014 at 11:11 AM, Jonathan Moore <moore@eds.org> wrote:
> I don't think this is a browser bug. I think it is a unforchent consequence
> of  web animations being an async API. With all other style/layout APIs the
> effects of actions are immediate. Attached is an example of the kind of
> thing I do in my lib. What I would like is some way to see the effects of
> the cancel() immediately; or better yet a way to ask for the computed style
> ignoring the animations effects ( without interrupting the animation ).

Thanks for the example!  Yes, that confirms that it's a timing issue;
the effects of stopping the animation haven't yet been recalculated
when you first ask for the data.  Adding a new element forces a style
recalc, as the browser needs to figure out what styles apply to that
element.

There are other ways to force style recalcs; this sort of issue is
unfortunately common on the web, and you should be able to find plenty
of tutorials for it.

~TJ
Received on Tuesday, 18 November 2014 19:33:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:52 UTC