@lvce-editor/explorer-view 7.6.0 → 7.8.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.
|
@@ -4438,15 +4438,21 @@ const handleRangeSelection = (state, startIndex, endIndex) => {
|
|
|
4438
4438
|
|
|
4439
4439
|
const handleClickAtRangeSelection = async (state, index) => {
|
|
4440
4440
|
const {
|
|
4441
|
+
focusedIndex,
|
|
4441
4442
|
items
|
|
4442
4443
|
} = state;
|
|
4443
4444
|
const firstSelectedIndex = items.findIndex(item => item.selected);
|
|
4444
|
-
|
|
4445
|
-
|
|
4445
|
+
let anchorIndex = firstSelectedIndex;
|
|
4446
|
+
if (anchorIndex === -1) {
|
|
4447
|
+
anchorIndex = focusedIndex === -1 ? index : focusedIndex;
|
|
4446
4448
|
}
|
|
4447
|
-
const min = Math.min(
|
|
4448
|
-
const max = Math.
|
|
4449
|
-
|
|
4449
|
+
const min = Math.min(anchorIndex, index);
|
|
4450
|
+
const max = Math.max(anchorIndex, index);
|
|
4451
|
+
const newState = handleRangeSelection(state, min, max);
|
|
4452
|
+
return {
|
|
4453
|
+
...newState,
|
|
4454
|
+
focusedIndex: index
|
|
4455
|
+
};
|
|
4450
4456
|
};
|
|
4451
4457
|
|
|
4452
4458
|
const toggleIndividualSelection = async (state, index) => {
|
|
@@ -5856,13 +5862,13 @@ const handleWheel = (state, deltaMode, deltaY) => {
|
|
|
5856
5862
|
return setDeltaY(state, state.deltaY + deltaY);
|
|
5857
5863
|
};
|
|
5858
5864
|
|
|
5859
|
-
const handleWorkspaceChange = async state => {
|
|
5865
|
+
const handleWorkspaceChange = async (state, _workspacePath, savedState) => {
|
|
5860
5866
|
const newRoot = await getWorkspacePath();
|
|
5861
5867
|
const state1 = {
|
|
5862
5868
|
...state,
|
|
5863
5869
|
root: newRoot
|
|
5864
5870
|
};
|
|
5865
|
-
const newState = await loadContent(state1,
|
|
5871
|
+
const newState = await loadContent(state1, savedState);
|
|
5866
5872
|
return newState;
|
|
5867
5873
|
};
|
|
5868
5874
|
|