Skip to content

Node Tap handler breaks after animating #249

@OskarGroth

Description

@OskarGroth

I have a Node set up like this using Macaw on iOS:

let bar = Shape(
    form: Rect(x: Double(x), y: Double(y), w: Double(width), h: Double(height)),  
    fill: point.color.macawColor
)

To which I add a tap event handler:

bar.onTap { tapEvent in
    print("Tap")
    bar.fillVar.animation(to: UIColor.red.macawColor, during: 1, delay: 0).autoreversed().play()
}

Expected:
All taps prints "Tap" and animates the bar.

What happened:
The first tap get registered, prints "Tap" and triggers an animation.
However, consecutive taps to the same node are never registered.

If I remove the animation, consecutive taps will print "Tap" just fine.

barss

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions