animations: Don't always re-resolve the node style

When animations and transitions change don't always re-resolve node
style, just replace the animation and transition rules and re-cascade.
This commit is contained in:
Martin Robinson 2020-06-08 16:09:03 +02:00
parent 364235ac0c
commit af0bb1f728
4 changed files with 108 additions and 108 deletions

View file

@ -882,10 +882,9 @@ impl ElementAnimationSet {
}
fn cancel_active_transitions(&mut self) {
self.dirty = !self.transitions.is_empty();
for transition in self.transitions.iter_mut() {
if transition.state != AnimationState::Finished {
self.dirty = true;
transition.state = AnimationState::Canceled;
}
}