@lvce-editor/explorer-view 7.21.3 → 7.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7227,6 +7227,7 @@ const getDragData = urls => {
|
|
|
7227
7227
|
|
|
7228
7228
|
const renderDragData = (oldState, newState) => {
|
|
7229
7229
|
const {
|
|
7230
|
+
focusedIndex,
|
|
7230
7231
|
isPointerDown,
|
|
7231
7232
|
items,
|
|
7232
7233
|
pointerDownIndex,
|
|
@@ -7235,9 +7236,16 @@ const renderDragData = (oldState, newState) => {
|
|
|
7235
7236
|
if (!isPointerDown) {
|
|
7236
7237
|
return [];
|
|
7237
7238
|
}
|
|
7238
|
-
const
|
|
7239
|
-
|
|
7240
|
-
|
|
7239
|
+
const pointerDownItem = items[pointerDownIndex];
|
|
7240
|
+
let draggedItems;
|
|
7241
|
+
if (pointerDownIndex === focusedIndex || pointerDownItem?.selected) {
|
|
7242
|
+
draggedItems = getSelectedItems(items, focusedIndex);
|
|
7243
|
+
} else if (pointerDownItem) {
|
|
7244
|
+
draggedItems = [pointerDownItem];
|
|
7245
|
+
} else {
|
|
7246
|
+
draggedItems = [];
|
|
7247
|
+
}
|
|
7248
|
+
const dragData = getDragData(draggedItems.map(item => item.path));
|
|
7241
7249
|
return ['Viewlet.setDragData', uid, dragData];
|
|
7242
7250
|
};
|
|
7243
7251
|
|