From cc9e69774bf3cd3a6600116b8b0a3c5a7e9114ee Mon Sep 17 00:00:00 2001 From: Javi Agenjo Date: Mon, 5 Nov 2018 16:11:14 +0100 Subject: [PATCH] Update README.md --- guides/README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/guides/README.md b/guides/README.md index 11c5586059..46f5932091 100644 --- a/guides/README.md +++ b/guides/README.md @@ -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