JS library for drag-and-drop lists, supports sortable and draggable
MIT License
selectHandle
does not take effect https://github.com/mfuu/sortable-dnd/issues/49
Published by mfuu 10 months ago
swapOnDrop
support use functionFull Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.6.2...v0.6.3
Published by mfuu 10 months ago
Added options
onChoose
: Element is chosenonUnchoose
: Element is unchosenAdded callback function's params
revertDrag
: revert draged element to initial position after moving to a another list in pull: 'clone'
& revertDrag: true
backToOrigin
: dragged element go back to the original list in pull: 'clone'
Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.6.1...v0.6.2
Published by mfuu 10 months ago
{
from, // previous list
to, // list, in which moved element.
node, // dragged element
nodes, // dragged elements
clone, // cloned element, all dnd operations are based on cloned element and do not alter the source dom(node).
clones, // cloned elements, there is a value only in the `pull: clone` after moving to a another list.
target, // drop element
oldIndex, // old index within parent
newIndex, // new index within parent
event, // TouchEvent | MouseEvent
pullMode, // Pull mode if dragging into another sortable.
relative, // Position of the drop element relative to the drag element after swap is complete.
} = params
revertClone
=> reverDrag
getOffset()
getRect()
Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.5.6...v0.6.0
Published by mfuu 11 months ago
clone
and bug fixed by @mfuu in https://github.com/mfuu/sortable-dnd/pull/45 https://github.com/mfuu/sortable-dnd/pull/44
adjusted the group
option to support clone
// string
new Sortable(el, {
...,
group: 'name'
})
// object
new Sortable(el, {
...,
group: {
name: 'group', // group name
pull: true | false | 'clone', // whether elements can be moved out of this list.
put: true | false | ['foo', 'bar'], // whether elements can be added from other lists, or an array of group names from which elements can be taken.
revertClone: true | false, // revert cloned element to initial position after moving to a another list.
}
})
Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.5.5...v0.5.6
Published by mfuu 11 months ago
Add options:
scrollSpeed
: Vertical&Horizontal scrolling speed (px). https://github.com/mfuu/sortable-dnd/issues/31#issue-1872830053
selectHandle
: Handle selector within list items which used to select element in multiple: true
. https://github.com/mfuu/sortable-dnd/issues/37#issue-2026003020
customGhost
: Customize the ghost element in drag. https://github.com/mfuu/sortable-dnd/issues/39#issue-2027571962
Add methods https://github.com/mfuu/sortable-dnd/issues/40#issue-2028184467:
select(element)
: Selects the provided multi-drag item.deselect(element)
: Deselects the provided multi-drag item.Bug fixed
Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.5.4...v0.5.5
Published by mfuu over 1 year ago
changed
get wrong value: https://github.com/mfuu/sortable-dnd/issues/26#issue-1781699160
Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.5.3...v0.5.4
Published by mfuu over 1 year ago
swapOnDrop
Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.5.2...v0.5.3
Published by mfuu over 1 year ago
create
, get
, option
methodsFull Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.5.0...v0.5.2
Published by mfuu over 1 year ago
group
option was invalidatedFull Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.4.13...v0.5.0
Published by mfuu over 1 year ago
delay
does not take effectPublished by mfuu over 1 year ago
Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.4.11...v0.4.12
Published by mfuu over 1 year ago
Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.4.10...v0.4.11
Published by mfuu over 1 year ago
delay
Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.4.9...v0.4.10
Published by mfuu over 1 year ago
Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.4.6...v0.4.9
Published by mfuu over 1 year ago
Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.4.3...v0.4.6
Published by mfuu over 1 year ago
Published by mfuu over 1 year ago
scrollStep
autoScroll
method is optimizedFull Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.4.1...v0.4.2
Published by mfuu about 2 years ago
Published by mfuu about 2 years ago
destroy
, https://github.com/mfuu/sortable-dnd/issues/10#issue-1338143374
forceFallback