Events
Events:
SVG Events:
Full scale DOM event types are supported along with some additional event behaviors like Drag, Zoom, etc.
Events
Event | SVG | Canvas | WebGL |
click | Yes | Yes | Yes |
dblclick | Yes | Yes | Yes |
mousemove | Yes | Yes | Yes |
mousedown | Yes | Yes | Yes |
mouseup | Yes | Yes | Yes |
mouseleave | Yes | Yes | Yes |
contextmenu | Yes | Yes | Yes |
touchstart | Yes | Yes | Yes |
touchend | Yes | Yes | Yes |
touchmove | Yes | Yes | Yes |
touchcancel | Yes | Yes | Yes |
Usage
#.on(eventType, eventHndlr)
To bind event handlers on the graphical element. Accepts eventType and event handler as an argument. The handler receives the event object as an argument.
Last updated