Events
Last updated
Last updated
Selectable fires a number of custom events that the instance can listen for.
You can attach a number of custom event listeners using the method and pass the event name and a callback as the first two arguments:
Event listeners can be detached by calling the method with the same arguments:
The instance is ready.
The instance has been destroyed
An item was added to the instance.
An item was removed from the instance.
mousedown
/ touchstart
.
mousemove
/ touchmove
.
mouseup
/ touchend
.
An item was selected.
An item was deselected.
An item has been marked for selection.
An item has been marked for deselection.
Save state change.
The instance was enabled.
The instance was disabled.