Skip to content

Commit c85b822

Browse files
committed
added comments to provide hint which callback does what
1 parent cf93af7 commit c85b822

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/js/examples/simple_with_animation.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ $(function () {
44
$("ol.simple_with_animation").sortable({
55
group: 'simple_with_animation',
66
pullPlaceholder: false,
7+
// animation on drop
78
onDrop: function (item, targetContainer, _super) {
89
var clonedItem = $('<li/>').css({height: 0})
910
item.before(clonedItem)
@@ -14,6 +15,8 @@ $(function () {
1415
_super(item)
1516
})
1617
},
18+
19+
// set item relative to cursor position
1720
onDragStart: function ($item, container, _super) {
1821
var offset = $item.offset(),
1922
pointer = container.rootGroup.pointer

0 commit comments

Comments
 (0)