Binding event handlers to Surface
nornagon opened this issue · comments
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>
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>