Update README.md

This commit is contained in:
Javi Agenjo
2018-11-05 16:11:14 +01:00
committed by GitHub
parent 621f8cdb9e
commit cc9e69774b

View File

@@ -98,11 +98,19 @@ node.onDrawForeground = function(canvas, ctx)
You can also grab events from the mouse in case your node has some sort of special interactivity.
node.onMouseDown = function(e)
```js
node.onMouseDown = function( event, canvas_pos, graphcanvas )
{
return true; //return true is the event was used by your node, to block other behaviours
}
```
Other methods are:
- onMouseMove
- onMouseUp
- onMouseEnter
- onMouseLeave
- onKey
## Integration