Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage level event does not seem to be working #59

Closed
AfflatusX opened this issue Jan 15, 2017 · 1 comment
Closed

Stage level event does not seem to be working #59

AfflatusX opened this issue Jan 15, 2017 · 1 comment

Comments

@AfflatusX
Copy link

Hi - I have following React code:

<Stage onMouseDown={e => console.log(e)}> <Layer> <Rect onClick={e => console.log(e)} /> </Layer> </Stage>

I added a logging statement where react-konva does the node.on(eventName, handler), and seeing the stage event handler is being registered successfully. However, when I run the code, console logging only happens when I click on the Rect. Clicking on the Stage yields nothing. Am I missing something here?

Thanks for any help!

@AfflatusX
Copy link
Author

actually nvm - looks like you have to have a empty shape there to catch events according to Konva's documentation. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant