An easy JavaScript library for selecting and moving elements. With no dependencies. Drag-Select & Drag-And-Drop. – Examples:
Full Changelog: https://github.com/ThibaultJanBeyer/DragSelect/compare/v3.0.4...v3.0.5
"elementselect" => "DS:select",
"elementunselect" => "DS:unselect",
"autoscroll" => "DS:scroll",
"dragstart" => "DS:start",
"dragmove" => "DS:update",
"callback" => "DS:end",
"preelementselect" => "DS:select:pre",
"preelementunselect" => "DS:unselect:pre",
"preautoscroll" => "DS:scroll:pre",
"predragstart" => "DS:start:pre",
"predragmove" => "DS:update:pre",
"precallback" => "DS:end:pre",
"DS:added:pre"
"DS:added"
"DS:removed:pre"
"DS:removed"
.es6m
to .esm
because that makes more sense/dist
folder for a small package size (previously also packaged the src folder for curious people, BUT they can also just come check out the code on github imo.dragAsBlock
is the default behavior..filterDragElements
Override inspired by #158
removeSelectables
as of 148 note however, that the items are still in the settings, thus will be re-added when manually running .start()
"elementselect" => "DS:select",
"elementunselect" => "DS:unselect",
"autoscroll" => "DS:scroll",
"dragstart" => "DS:start",
"dragmove" => "DS:update",
"callback" => "DS:end",
"preelementselect" => "DS:select:pre",
"preelementunselect" => "DS:unselect:pre",
"preautoscroll" => "DS:scroll:pre",
"predragstart" => "DS:start:pre",
"predragmove" => "DS:update:pre",
"precallback" => "DS:end:pre",
"DS:added:pre"
"DS:added"
"DS:removed:pre"
"DS:removed"
dragAsBlock
is the default behavior..filterDragElements
Override inspired by #158
removeSelectables
as of 148 note however, that the items are still in the settings, thus will be re-added when manually running .start()
dragAsBlock: true
and report any issue you find here. Thanks to @rendertom for the addition #162.Note: this feature will be turned on by default in a future release once proper testing and all bugs are fixed
filterSelected
in Selection
moduleisCollision
helper method