W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2020

Re: [csswg-drafts] [web-animations] Could commitStyles always write the end state of the animation? (#5394)

From: Robert Flack via GitHub <sysbot+gh@w3.org>
Date: Fri, 28 Aug 2020 14:54:58 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-682660451-1598626497-sysbot+gh@w3.org>
I think there are issues with immediately committing the end value when you have composite animations:

animA = element.animate(
    {transform: ['translateX(0)', 'translateX(500px)']},
    {duration: 5000, composite: 'add'});
animA.commitStyles(); // element.style.transform = 'translateX(500px)';

Now the effect is animating from 500px to 1000px?

This is why in #5475 I proposed we don't commit immediately but rather commit the style change when the animation finishes (on an infinitely precise timeline which is conceptually identical to filling forwards).

GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5394#issuecomment-682660451 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 28 August 2020 14:55:00 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:13 UTC