Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Binding event handlers to Surface #51

Open
nornagon opened this issue Jul 3, 2015 · 2 comments
Open

Binding event handlers to Surface #51

nornagon opened this issue Jul 3, 2015 · 2 comments

Comments

@nornagon
Copy link

nornagon commented Jul 3, 2015

It doesn't seem to be possible to bind event handlers to the root Surface object. Given the following, the mouseDown handler never gets called:

<Surface onMouseDown={@mouseDown}>...</Surface>
@ThomWright
Copy link
Contributor

I've used something like the following to achieve the same effect:

<div ref='canvas' onMouseDown={@mouseDown} style={{padding: 0, margin: 0, border: 0}}>
  <Surface>...</Surface>
</div>

@jimfb
Copy link
Member

jimfb commented Jul 13, 2015

@spicyj

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

No branches or pull requests

3 participants