Make hover animation work#6129
Conversation
|
@nagix good catch. I think it's negligible but did you profile the performance hit of this final clone? |
|
Looks great @nagix. Great catch! |
|
This clone with 47 properties always finishes in less than 0.2ms and is called once per animation, so I don't think it impacts the performance. |
|
...But let me check a chart with more data points as this could impact all the elements. |
|
This is the
|
|
The overhead of the clone was not small as expected. Another option would be to clone The downside is that it is not guaranteed that |
|
The duration of
|
570633c
|
Now it just uses |
|
Reverted the previous change as |
|
Would |
|
Or would |
|
|
|
Here is another run.
As far as I know, |
|
I'm guessing that That loops over multiple inputs does a function call per key. I'm guessing it'd be much faster to do something like: Or potentially faster still: |
Element._modelhas to be cloned toElement._viewwhenElement.transition(1)is called. Otherwise, when_model.*is set on hover,_view.*is also set to the same value, and an animation doesn't occur.This PR makes makes hover animation work.
Master: https://jsfiddle.net/nagix/gL0sebrh/
This PR: https://jsfiddle.net/nagix/bjhp163w/
Fixes #5691