drag
Fires on mousemove
/ touchmove
.
The callback has two parameters which returns the orignal event and coordinates of the selection area (lasso) as an Object
.
selectable.on("drag", function(e, coords) {
});
The coords
parameter returns an Object
of the following format:
{
x1: Number, // the origin x offset
y1: Number, // the origin y offset
x2: Number, // the x offset from x1
y2: Number, // the y offset from y1
}
x1,y1 (origin)
+----------------------+
| |
| |
| |
| |
| |
| |
+----------------------+
x2, y2 (mouse pointer)
Last updated