|
|
|
@ -30,6 +30,7 @@
|
|
|
|
|
forceFallback : { type: Boolean, value: false, observer: "forceFallbackChanged" }, |
|
|
|
|
fallbackClass : { type: String, value: "sortable-fallback", observer: "fallbackClassChanged" }, |
|
|
|
|
fallbackOnBody : { type: Boolean, value: false, observer: "fallbackOnBodyChanged" }, |
|
|
|
|
manuallyHandleUpdateEvents : { type: Boolean, value: false }, |
|
|
|
|
draggable : {}, |
|
|
|
|
scroll : {} |
|
|
|
|
}, |
|
|
|
@ -78,8 +79,12 @@
|
|
|
|
|
this.sortable = Sortable.create(this, Object.assign(options, { |
|
|
|
|
onUpdate: e => { |
|
|
|
|
if (template) { |
|
|
|
|
if(manuallyHandleUpdateEvents) { |
|
|
|
|
template.items.splice(e.newIndex, 0, template.items.splice(e.oldIndex, 1)[0]); |
|
|
|
|
} else { |
|
|
|
|
template.splice("items", e.newIndex, 0, template.splice("items", e.oldIndex, 1)[0]) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.fire("update", e) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|