-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
transformOrder
added
#459
transformOrder
added
#459
Conversation
Good stuff, Samuel! Anyone else have thoughts on this? |
Nice idea - however my one thought is this - we have several other things (background-image and box-shadow spring to mind) - would it be possible to extend this idea, or make an API type idea, to allow animating a multiple list of those too? Can't think of anything off the top of my head, but I think that this might actually be a simple enough idea to start something :-D |
I probably won't have time to generalize it as this was me hotfixing something downstream for my job, but if I had to speculate for a general solution, it would be something like: "cssOrder": {
"transform": ["translateX", "scaleX"],
"otherCssProperty": ["foo", "bar"]
} That being said, the two examples you gave of |
I was thinking more along the lines of animating either colours or values, so a linear gradient background could have the colour stops change or move etc - more of an idea that this gives a start to getting those animated without having to manually code everything. Possibly something like -
Back on topic - I think this solution works well for transforms, and would hit on almost exactly half of the issues people have with it ;-) |
Ah I see what you mean :) I'm probably not gonna be able to find time to work on any solutions like that but I get what you are saying. For now, I think just supporting the transforms should be good because there is an explicit shortcoming with transforms being order-dependent but it could probably be broken out if the other functionality ends up implemented as well |
I'm going to +1 this issue. In particular, we need translate and scale to reliably apply in that order, and this patch would allow that. |
+1 |
+1. No way to reverse animate transforms because the rotates and translates get applied randomly |
Got a probable alternative to this in #697 - comments would be useful |
Solution for #197. There is now an options argument called
transformOrder
which is by default an empty array. It can be filled with an ordered list of transform properties as strings. It will sort thetransformCache
before applying it.