Reputation: 1
I want to make it so that clicking on the contents of a particular stage change the state of a variable.
This works when I move the onClick={} to Stage but doesn't work with the Layer. What could be causing this? This seems to work with the html version of Konva
Upvotes: 0
Views: 127
Reputation: 20308
Every event of the layer starts from a shape. Clicking on empty space will not trigger any events on the layer.
For Stage it works differently. The stage will fire events when you click on empty areas.
Upvotes: 1