lotus-ios / lotus

A Swift animation DSL for animating layers with help of CoreAnimation
MIT License
15 stars 2 forks source link

Animation works incorrectly after second chaining group #28

Closed vkondrashkov closed 5 years ago

vkondrashkov commented 5 years ago

There is an issue while using multiple chaining for one type of animation. After first animation block completion second one runs correctly, but after it has finished model isn't updating and that's why third group will play from previous state, not from a new one.

Example:

layer.lotus.runAnimation {
    $0.scaling.to(2.0)
}.then {
    $0.scaling.to(1.0)
}.then {
    $0.scaling.to(1.5) // This animation will start from scale = 2.0, not 1.0
}