@lvce-editor/main-area-worker 9.71.0 → 9.71.2
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.
|
@@ -4794,18 +4794,15 @@ const renderSegmentChildren = (direction, groups, splitButtonEnabled, tabDropInd
|
|
|
4794
4794
|
const nestedDirection = segment.direction;
|
|
4795
4795
|
const nestedChildCount = segment.groups.length + segment.groups.length - 1;
|
|
4796
4796
|
const nestedChildren = [];
|
|
4797
|
-
let nestedCount = 0;
|
|
4798
4797
|
for (let j = 0; j < segment.groups.length; j++) {
|
|
4799
4798
|
if (j > 0) {
|
|
4800
4799
|
const beforeGroupId = segment.groups[j - 1].id;
|
|
4801
4800
|
const afterGroupId = segment.groups[j].id;
|
|
4802
4801
|
const sashId = create(beforeGroupId, afterGroupId);
|
|
4803
4802
|
nestedChildren.push(...renderSash(nestedDirection, sashId));
|
|
4804
|
-
nestedCount++;
|
|
4805
4803
|
}
|
|
4806
4804
|
const group = segment.groups[j];
|
|
4807
4805
|
nestedChildren.push(...renderEditorGroup(group, segment.startIndex + j, splitButtonEnabled, true, tabDropIndicator));
|
|
4808
|
-
nestedCount++;
|
|
4809
4806
|
}
|
|
4810
4807
|
children.push({
|
|
4811
4808
|
childCount: nestedChildCount,
|
|
@@ -4815,7 +4812,6 @@ const renderSegmentChildren = (direction, groups, splitButtonEnabled, tabDropInd
|
|
|
4815
4812
|
});
|
|
4816
4813
|
children.push(...nestedChildren);
|
|
4817
4814
|
childCount++;
|
|
4818
|
-
childCount += nestedCount;
|
|
4819
4815
|
}
|
|
4820
4816
|
return {
|
|
4821
4817
|
childCount,
|
|
@@ -6912,7 +6908,7 @@ const moveTabToGroup = (state, sourceGroupId, targetGroupId, tabId, targetIndex)
|
|
|
6912
6908
|
}
|
|
6913
6909
|
return group;
|
|
6914
6910
|
});
|
|
6915
|
-
|
|
6911
|
+
const nextState = {
|
|
6916
6912
|
...state,
|
|
6917
6913
|
layout: {
|
|
6918
6914
|
...layout,
|
|
@@ -6920,6 +6916,11 @@ const moveTabToGroup = (state, sourceGroupId, targetGroupId, tabId, targetIndex)
|
|
|
6920
6916
|
groups: updatedGroups
|
|
6921
6917
|
}
|
|
6922
6918
|
};
|
|
6919
|
+
const updatedSourceGroup = updatedGroups.find(group => group.id === sourceGroupId);
|
|
6920
|
+
if (updatedSourceGroup?.tabs.length === 0) {
|
|
6921
|
+
return closeEditorGroup$1(nextState, sourceGroupId);
|
|
6922
|
+
}
|
|
6923
|
+
return nextState;
|
|
6923
6924
|
};
|
|
6924
6925
|
|
|
6925
6926
|
const getOpenTabCount = state => {
|