Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style added by JS is lost after animation #21

Open
pfedan opened this issue Aug 29, 2019 · 0 comments
Open

Style added by JS is lost after animation #21

pfedan opened this issue Aug 29, 2019 · 0 comments

Comments

@pfedan
Copy link

pfedan commented Aug 29, 2019

When I add a custom style to an element with JS like
node.style.transform = "rotate(" + (Math.floor(Math.random() * 20) - 10).toString() + "deg)";
and then do an action that animates the grid, the previous rotation is lost.

I guess this is due to the fact, that the animation mechanism uses transform for itself and just overwrites everything that was there before.

Is it possible to keep all previously defined styles and only add the transforms for the animation of the grid?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant