mirror of
https://github.com/exyte/Macaw.git
synced 2024-09-11 13:15:35 +03:00
Previously animated nodes fix
This commit is contained in:
parent
db33ca09ec
commit
2518621eaa
@ -139,6 +139,10 @@ open class MacawView: UIView, UIGestureRecognizerDelegate {
|
||||
|
||||
let animatedNodes = AnimationUtils.animatedNodes(root: node, animationCache: cache)
|
||||
|
||||
defer {
|
||||
prevAnimatedNodes = animatedNodes
|
||||
}
|
||||
|
||||
// No animation case
|
||||
if animatedNodes.count == 0 || animatedNodes.count > 20 {
|
||||
zLayers.forEach { $0.removeFromSuperlayer() }
|
||||
@ -167,7 +171,6 @@ open class MacawView: UIView, UIGestureRecognizerDelegate {
|
||||
// Removing old ones
|
||||
zLayers.forEach { $0.removeFromSuperlayer() }
|
||||
zLayers.removeAll()
|
||||
prevAnimatedNodes = animatedNodes
|
||||
|
||||
// Adding new
|
||||
var indexCache = [Node: Int]()
|
||||
|
Loading…
Reference in New Issue
Block a user