fix multidrag

This commit is contained in:
vcoppe committed 2026-10-31 14:16:57 +01:00
1 parent c3ce577e6d
commit 50348e7c5c
1 file changed
+6 -2
@@ -79,9 +79,13 @@ export class SortableFileList {
setTimeout(() => this.updateToSelection(e), 50),
onDeselect: (e: Sortable.SortableEvent) =>
setTimeout(() => this.updateToSelection(e), 50),
onStart: (e: Sortable.SortableEvent) => {
// all the nodes, not only the elements: the comments are the anchors of the Svelte blocks
onChoose: () => {
// all the nodes, not only the elements: the comments are the anchors of the Svelte
// blocks. Taken before the drag starts, when MultiDrag removes the other selected
// elements from the list.
this._snapshot = Array.from(container.childNodes);
},
onStart: (e: Sortable.SortableEvent) => {
dragging.set(sortableLevel);
// the files that are dragged (or whose elements are) are open for good
engine.keepPreview(this.draggedFiles(e));