Canvas Cheat Sheet

HTML5 Canvas Cheat Sheet

HTML5 Canvas Shape Events with KineticJS


To detect shape events with KineticJS, we can use the on() method to bind event handlers to a node.  The on() method requires an event type and a function to be executed when the event occurs.  KineticJS supports mouseover, mouseout, mouseenter, mouseleave, mousemove, mousedown, mouseup, click, dblclick, dragstart, and dragend desktop events.

Instructions: Mouseover and mouseout of the triangle, and mouseover, mouseout, mousedown, and mouseup over the circle.

comments powered by Disqus