dockview-core 4.6.0 → 4.7.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.
- package/dist/cjs/constants.d.ts +1 -0
- package/dist/cjs/constants.js +2 -1
- package/dist/cjs/dnd/droptarget.js +46 -17
- package/dist/cjs/dockview/dockviewComponent.d.ts +6 -0
- package/dist/cjs/dockview/dockviewComponent.js +112 -85
- package/dist/cjs/gridview/gridview.d.ts +1 -0
- package/dist/cjs/gridview/gridview.js +37 -0
- package/dist/cjs/overlay/overlayRenderContainer.d.ts +3 -0
- package/dist/cjs/overlay/overlayRenderContainer.js +82 -8
- package/dist/dockview-core.amd.js +215 -55
- package/dist/dockview-core.amd.js.map +1 -1
- package/dist/dockview-core.amd.min.js +2 -2
- package/dist/dockview-core.amd.min.js.map +1 -1
- package/dist/dockview-core.amd.min.noStyle.js +2 -2
- package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
- package/dist/dockview-core.amd.noStyle.js +214 -54
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +215 -55
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +215 -55
- package/dist/dockview-core.esm.js.map +1 -1
- package/dist/dockview-core.esm.min.js +2 -2
- package/dist/dockview-core.esm.min.js.map +1 -1
- package/dist/dockview-core.js +215 -55
- package/dist/dockview-core.js.map +1 -1
- package/dist/dockview-core.min.js +2 -2
- package/dist/dockview-core.min.js.map +1 -1
- package/dist/dockview-core.min.noStyle.js +2 -2
- package/dist/dockview-core.min.noStyle.js.map +1 -1
- package/dist/dockview-core.noStyle.js +214 -54
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/constants.d.ts +1 -0
- package/dist/esm/constants.js +1 -0
- package/dist/esm/dnd/droptarget.js +46 -17
- package/dist/esm/dockview/dockviewComponent.d.ts +6 -0
- package/dist/esm/dockview/dockviewComponent.js +62 -29
- package/dist/esm/gridview/gridview.d.ts +1 -0
- package/dist/esm/gridview/gridview.js +36 -0
- package/dist/esm/overlay/overlayRenderContainer.d.ts +3 -0
- package/dist/esm/overlay/overlayRenderContainer.js +69 -8
- package/dist/styles/dockview.css +37 -5
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 4.
|
|
3
|
+
* @version 4.7.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -2139,6 +2139,19 @@
|
|
|
2139
2139
|
}
|
|
2140
2140
|
throw new Error('invalid node');
|
|
2141
2141
|
}
|
|
2142
|
+
function cloneNode(node, size, orthogonalSize) {
|
|
2143
|
+
if (node instanceof BranchNode) {
|
|
2144
|
+
const result = new BranchNode(node.orientation, node.proportionalLayout, node.styles, size, orthogonalSize, node.disabled, node.margin);
|
|
2145
|
+
for (let i = node.children.length - 1; i >= 0; i--) {
|
|
2146
|
+
const child = node.children[i];
|
|
2147
|
+
result.addChild(cloneNode(child, child.size, child.orthogonalSize), child.size, 0, true);
|
|
2148
|
+
}
|
|
2149
|
+
return result;
|
|
2150
|
+
}
|
|
2151
|
+
else {
|
|
2152
|
+
return new LeafNode(node.view, node.orientation, orthogonalSize);
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2142
2155
|
function flipNode(node, size, orthogonalSize) {
|
|
2143
2156
|
if (node instanceof BranchNode) {
|
|
2144
2157
|
const result = new BranchNode(orthogonal(node.orientation), node.proportionalLayout, node.styles, size, orthogonalSize, node.disabled, node.margin);
|
|
@@ -2489,6 +2502,29 @@
|
|
|
2489
2502
|
this._onDidChange.fire(e);
|
|
2490
2503
|
});
|
|
2491
2504
|
}
|
|
2505
|
+
normalize() {
|
|
2506
|
+
if (!this._root) {
|
|
2507
|
+
return;
|
|
2508
|
+
}
|
|
2509
|
+
if (this._root.children.length !== 1) {
|
|
2510
|
+
return;
|
|
2511
|
+
}
|
|
2512
|
+
const oldRoot = this.root;
|
|
2513
|
+
// can remove one level of redundant branching if there is only a single child
|
|
2514
|
+
const childReference = oldRoot.children[0];
|
|
2515
|
+
if (childReference instanceof LeafNode) {
|
|
2516
|
+
return;
|
|
2517
|
+
}
|
|
2518
|
+
oldRoot.element.remove();
|
|
2519
|
+
const child = oldRoot.removeChild(0); // Remove child to prevent double disposal
|
|
2520
|
+
oldRoot.dispose(); // Dispose old root (won't dispose removed child)
|
|
2521
|
+
child.dispose(); // Dispose the removed child
|
|
2522
|
+
this._root = cloneNode(childReference, childReference.size, childReference.orthogonalSize);
|
|
2523
|
+
this.element.appendChild(this._root.element);
|
|
2524
|
+
this.disposable.value = this._root.onDidChange((e) => {
|
|
2525
|
+
this._onDidChange.fire(e);
|
|
2526
|
+
});
|
|
2527
|
+
}
|
|
2492
2528
|
/**
|
|
2493
2529
|
* If the root is orientated as a VERTICAL node then nest the existing root within a new HORIZIONTAL root node
|
|
2494
2530
|
* If the root is orientated as a HORIZONTAL node then nest the existing root within a new VERITCAL root node
|
|
@@ -3880,6 +3916,48 @@
|
|
|
3880
3916
|
}
|
|
3881
3917
|
}
|
|
3882
3918
|
|
|
3919
|
+
function setGPUOptimizedBounds(element, bounds) {
|
|
3920
|
+
const { top, left, width, height } = bounds;
|
|
3921
|
+
const topPx = `${Math.round(top)}px`;
|
|
3922
|
+
const leftPx = `${Math.round(left)}px`;
|
|
3923
|
+
const widthPx = `${Math.round(width)}px`;
|
|
3924
|
+
const heightPx = `${Math.round(height)}px`;
|
|
3925
|
+
// Use traditional positioning but maintain GPU layer
|
|
3926
|
+
element.style.top = topPx;
|
|
3927
|
+
element.style.left = leftPx;
|
|
3928
|
+
element.style.width = widthPx;
|
|
3929
|
+
element.style.height = heightPx;
|
|
3930
|
+
element.style.visibility = 'visible';
|
|
3931
|
+
// Ensure GPU layer is maintained
|
|
3932
|
+
if (!element.style.transform || element.style.transform === '') {
|
|
3933
|
+
element.style.transform = 'translate3d(0, 0, 0)';
|
|
3934
|
+
}
|
|
3935
|
+
}
|
|
3936
|
+
function setGPUOptimizedBoundsFromStrings(element, bounds) {
|
|
3937
|
+
const { top, left, width, height } = bounds;
|
|
3938
|
+
// Use traditional positioning but maintain GPU layer
|
|
3939
|
+
element.style.top = top;
|
|
3940
|
+
element.style.left = left;
|
|
3941
|
+
element.style.width = width;
|
|
3942
|
+
element.style.height = height;
|
|
3943
|
+
element.style.visibility = 'visible';
|
|
3944
|
+
// Ensure GPU layer is maintained
|
|
3945
|
+
if (!element.style.transform || element.style.transform === '') {
|
|
3946
|
+
element.style.transform = 'translate3d(0, 0, 0)';
|
|
3947
|
+
}
|
|
3948
|
+
}
|
|
3949
|
+
function checkBoundsChanged(element, bounds) {
|
|
3950
|
+
const { top, left, width, height } = bounds;
|
|
3951
|
+
const topPx = `${Math.round(top)}px`;
|
|
3952
|
+
const leftPx = `${Math.round(left)}px`;
|
|
3953
|
+
const widthPx = `${Math.round(width)}px`;
|
|
3954
|
+
const heightPx = `${Math.round(height)}px`;
|
|
3955
|
+
// Check if position or size changed (back to traditional method)
|
|
3956
|
+
return element.style.top !== topPx ||
|
|
3957
|
+
element.style.left !== leftPx ||
|
|
3958
|
+
element.style.width !== widthPx ||
|
|
3959
|
+
element.style.height !== heightPx;
|
|
3960
|
+
}
|
|
3883
3961
|
class WillShowOverlayEvent extends DockviewEvent {
|
|
3884
3962
|
get nativeEvent() {
|
|
3885
3963
|
return this.options.nativeEvent;
|
|
@@ -4161,21 +4239,11 @@
|
|
|
4161
4239
|
box.left = rootLeft + width - 4;
|
|
4162
4240
|
box.width = 4;
|
|
4163
4241
|
}
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
const widthPx = `${Math.round(box.width)}px`;
|
|
4167
|
-
const heightPx = `${Math.round(box.height)}px`;
|
|
4168
|
-
if (overlay.style.top === topPx &&
|
|
4169
|
-
overlay.style.left === leftPx &&
|
|
4170
|
-
overlay.style.width === widthPx &&
|
|
4171
|
-
overlay.style.height === heightPx) {
|
|
4242
|
+
// Use GPU-optimized bounds checking and setting
|
|
4243
|
+
if (!checkBoundsChanged(overlay, box)) {
|
|
4172
4244
|
return;
|
|
4173
4245
|
}
|
|
4174
|
-
overlay
|
|
4175
|
-
overlay.style.left = leftPx;
|
|
4176
|
-
overlay.style.width = widthPx;
|
|
4177
|
-
overlay.style.height = heightPx;
|
|
4178
|
-
overlay.style.visibility = 'visible';
|
|
4246
|
+
setGPUOptimizedBounds(overlay, box);
|
|
4179
4247
|
overlay.className = `dv-drop-target-anchor${this.options.className ? ` ${this.options.className}` : ''}`;
|
|
4180
4248
|
toggleClass(overlay, 'dv-drop-target-left', isLeft);
|
|
4181
4249
|
toggleClass(overlay, 'dv-drop-target-right', isRight);
|
|
@@ -4227,10 +4295,7 @@
|
|
|
4227
4295
|
box.top = `${100 * (1 - size)}%`;
|
|
4228
4296
|
box.height = `${100 * size}%`;
|
|
4229
4297
|
}
|
|
4230
|
-
this.overlayElement
|
|
4231
|
-
this.overlayElement.style.left = box.left;
|
|
4232
|
-
this.overlayElement.style.width = box.width;
|
|
4233
|
-
this.overlayElement.style.height = box.height;
|
|
4298
|
+
setGPUOptimizedBoundsFromStrings(this.overlayElement, box);
|
|
4234
4299
|
toggleClass(this.overlayElement, 'dv-drop-target-small-vertical', isSmallY);
|
|
4235
4300
|
toggleClass(this.overlayElement, 'dv-drop-target-small-horizontal', isSmallX);
|
|
4236
4301
|
toggleClass(this.overlayElement, 'dv-drop-target-left', isLeft);
|
|
@@ -7673,7 +7738,36 @@
|
|
|
7673
7738
|
|
|
7674
7739
|
const DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE = 100;
|
|
7675
7740
|
const DEFAULT_FLOATING_GROUP_POSITION = { left: 100, top: 100, width: 300, height: 300 };
|
|
7741
|
+
const DESERIALIZATION_POPOUT_DELAY_MS = 100;
|
|
7676
7742
|
|
|
7743
|
+
class PositionCache {
|
|
7744
|
+
constructor() {
|
|
7745
|
+
this.cache = new Map();
|
|
7746
|
+
this.currentFrameId = 0;
|
|
7747
|
+
this.rafId = null;
|
|
7748
|
+
}
|
|
7749
|
+
getPosition(element) {
|
|
7750
|
+
const cached = this.cache.get(element);
|
|
7751
|
+
if (cached && cached.frameId === this.currentFrameId) {
|
|
7752
|
+
return cached.rect;
|
|
7753
|
+
}
|
|
7754
|
+
this.scheduleFrameUpdate();
|
|
7755
|
+
const rect = getDomNodePagePosition(element);
|
|
7756
|
+
this.cache.set(element, { rect, frameId: this.currentFrameId });
|
|
7757
|
+
return rect;
|
|
7758
|
+
}
|
|
7759
|
+
invalidate() {
|
|
7760
|
+
this.currentFrameId++;
|
|
7761
|
+
}
|
|
7762
|
+
scheduleFrameUpdate() {
|
|
7763
|
+
if (this.rafId)
|
|
7764
|
+
return;
|
|
7765
|
+
this.rafId = requestAnimationFrame(() => {
|
|
7766
|
+
this.currentFrameId++;
|
|
7767
|
+
this.rafId = null;
|
|
7768
|
+
});
|
|
7769
|
+
}
|
|
7770
|
+
}
|
|
7677
7771
|
function createFocusableElement() {
|
|
7678
7772
|
const element = document.createElement('div');
|
|
7679
7773
|
element.tabIndex = -1;
|
|
@@ -7686,6 +7780,8 @@
|
|
|
7686
7780
|
this.accessor = accessor;
|
|
7687
7781
|
this.map = {};
|
|
7688
7782
|
this._disposed = false;
|
|
7783
|
+
this.positionCache = new PositionCache();
|
|
7784
|
+
this.pendingUpdates = new Set();
|
|
7689
7785
|
this.addDisposables(exports.DockviewDisposable.from(() => {
|
|
7690
7786
|
for (const value of Object.values(this.map)) {
|
|
7691
7787
|
value.disposable.dispose();
|
|
@@ -7694,6 +7790,19 @@
|
|
|
7694
7790
|
this._disposed = true;
|
|
7695
7791
|
}));
|
|
7696
7792
|
}
|
|
7793
|
+
updateAllPositions() {
|
|
7794
|
+
if (this._disposed) {
|
|
7795
|
+
return;
|
|
7796
|
+
}
|
|
7797
|
+
// Invalidate position cache to force recalculation
|
|
7798
|
+
this.positionCache.invalidate();
|
|
7799
|
+
// Call resize function directly for all visible panels
|
|
7800
|
+
for (const entry of Object.values(this.map)) {
|
|
7801
|
+
if (entry.panel.api.isVisible && entry.resize) {
|
|
7802
|
+
entry.resize();
|
|
7803
|
+
}
|
|
7804
|
+
}
|
|
7805
|
+
}
|
|
7697
7806
|
detatch(panel) {
|
|
7698
7807
|
if (this.map[panel.api.id]) {
|
|
7699
7808
|
const { disposable, destroy } = this.map[panel.api.id];
|
|
@@ -7724,17 +7833,33 @@
|
|
|
7724
7833
|
this.element.appendChild(focusContainer);
|
|
7725
7834
|
}
|
|
7726
7835
|
const resize = () => {
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7836
|
+
const panelId = panel.api.id;
|
|
7837
|
+
if (this.pendingUpdates.has(panelId)) {
|
|
7838
|
+
return; // Update already scheduled
|
|
7839
|
+
}
|
|
7840
|
+
this.pendingUpdates.add(panelId);
|
|
7841
|
+
requestAnimationFrame(() => {
|
|
7842
|
+
this.pendingUpdates.delete(panelId);
|
|
7843
|
+
if (this.isDisposed || !this.map[panelId]) {
|
|
7844
|
+
return;
|
|
7845
|
+
}
|
|
7846
|
+
const box = this.positionCache.getPosition(referenceContainer.element);
|
|
7847
|
+
const box2 = this.positionCache.getPosition(this.element);
|
|
7848
|
+
// Use traditional positioning for overlay containers
|
|
7849
|
+
const left = box.left - box2.left;
|
|
7850
|
+
const top = box.top - box2.top;
|
|
7851
|
+
const width = box.width;
|
|
7852
|
+
const height = box.height;
|
|
7853
|
+
focusContainer.style.left = `${left}px`;
|
|
7854
|
+
focusContainer.style.top = `${top}px`;
|
|
7855
|
+
focusContainer.style.width = `${width}px`;
|
|
7856
|
+
focusContainer.style.height = `${height}px`;
|
|
7857
|
+
toggleClass(focusContainer, 'dv-render-overlay-float', panel.group.api.location.type === 'floating');
|
|
7858
|
+
});
|
|
7735
7859
|
};
|
|
7736
7860
|
const visibilityChanged = () => {
|
|
7737
7861
|
if (panel.api.isVisible) {
|
|
7862
|
+
this.positionCache.invalidate();
|
|
7738
7863
|
resize();
|
|
7739
7864
|
}
|
|
7740
7865
|
focusContainer.style.display = panel.api.isVisible ? '' : 'none';
|
|
@@ -7829,6 +7954,8 @@
|
|
|
7829
7954
|
this.map[panel.api.id].disposable.dispose();
|
|
7830
7955
|
// and reset the disposable to the active reference-container
|
|
7831
7956
|
this.map[panel.api.id].disposable = disposable;
|
|
7957
|
+
// store the resize function for direct access
|
|
7958
|
+
this.map[panel.api.id].resize = resize;
|
|
7832
7959
|
return focusContainer;
|
|
7833
7960
|
}
|
|
7834
7961
|
}
|
|
@@ -8221,6 +8348,13 @@
|
|
|
8221
8348
|
get floatingGroups() {
|
|
8222
8349
|
return this._floatingGroups;
|
|
8223
8350
|
}
|
|
8351
|
+
/**
|
|
8352
|
+
* Promise that resolves when all popout groups from the last fromJSON call are restored.
|
|
8353
|
+
* Useful for tests that need to wait for delayed popout creation.
|
|
8354
|
+
*/
|
|
8355
|
+
get popoutRestorationPromise() {
|
|
8356
|
+
return this._popoutRestorationPromise;
|
|
8357
|
+
}
|
|
8224
8358
|
constructor(container, options) {
|
|
8225
8359
|
var _a, _b, _c;
|
|
8226
8360
|
super(container, {
|
|
@@ -8269,6 +8403,7 @@
|
|
|
8269
8403
|
this.onDidMaximizedGroupChange = this._onDidMaximizedGroupChange.event;
|
|
8270
8404
|
this._floatingGroups = [];
|
|
8271
8405
|
this._popoutGroups = [];
|
|
8406
|
+
this._popoutRestorationPromise = Promise.resolve();
|
|
8272
8407
|
this._onDidRemoveGroup = new Emitter();
|
|
8273
8408
|
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
8274
8409
|
this._onDidAddGroup = new Emitter();
|
|
@@ -8818,6 +8953,7 @@
|
|
|
8818
8953
|
this.updateWatermark();
|
|
8819
8954
|
}
|
|
8820
8955
|
orthogonalize(position, options) {
|
|
8956
|
+
this.gridview.normalize();
|
|
8821
8957
|
switch (position) {
|
|
8822
8958
|
case 'top':
|
|
8823
8959
|
case 'bottom':
|
|
@@ -9061,18 +9197,30 @@
|
|
|
9061
9197
|
});
|
|
9062
9198
|
}
|
|
9063
9199
|
const serializedPopoutGroups = (_b = data.popoutGroups) !== null && _b !== void 0 ? _b : [];
|
|
9064
|
-
|
|
9200
|
+
// Create a promise that resolves when all popout groups are created
|
|
9201
|
+
const popoutPromises = [];
|
|
9202
|
+
// Queue popup group creation with delays to avoid browser blocking
|
|
9203
|
+
serializedPopoutGroups.forEach((serializedPopoutGroup, index) => {
|
|
9065
9204
|
const { data, position, gridReferenceGroup, url } = serializedPopoutGroup;
|
|
9066
9205
|
const group = createGroupFromSerializedState(data);
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
9206
|
+
// Add a small delay for each popup after the first to avoid browser popup blocking
|
|
9207
|
+
const popoutPromise = new Promise((resolve) => {
|
|
9208
|
+
setTimeout(() => {
|
|
9209
|
+
this.addPopoutGroup(group, {
|
|
9210
|
+
position: position !== null && position !== void 0 ? position : undefined,
|
|
9211
|
+
overridePopoutGroup: gridReferenceGroup ? group : undefined,
|
|
9212
|
+
referenceGroup: gridReferenceGroup
|
|
9213
|
+
? this.getPanel(gridReferenceGroup)
|
|
9214
|
+
: undefined,
|
|
9215
|
+
popoutUrl: url,
|
|
9216
|
+
});
|
|
9217
|
+
resolve();
|
|
9218
|
+
}, index * DESERIALIZATION_POPOUT_DELAY_MS); // 100ms delay between each popup
|
|
9074
9219
|
});
|
|
9075
|
-
|
|
9220
|
+
popoutPromises.push(popoutPromise);
|
|
9221
|
+
});
|
|
9222
|
+
// Store the promise for tests to wait on
|
|
9223
|
+
this._popoutRestorationPromise = Promise.all(popoutPromises).then(() => void 0);
|
|
9076
9224
|
for (const floatingGroup of this._floatingGroups) {
|
|
9077
9225
|
floatingGroup.overlay.setBounds();
|
|
9078
9226
|
}
|
|
@@ -9119,6 +9267,10 @@
|
|
|
9119
9267
|
throw err;
|
|
9120
9268
|
}
|
|
9121
9269
|
this.updateWatermark();
|
|
9270
|
+
// Force position updates for always visible panels after DOM layout is complete
|
|
9271
|
+
requestAnimationFrame(() => {
|
|
9272
|
+
this.overlayRenderContainer.updateAllPositions();
|
|
9273
|
+
});
|
|
9122
9274
|
this._onDidLayoutFromJSON.fire();
|
|
9123
9275
|
}
|
|
9124
9276
|
clear() {
|
|
@@ -9619,7 +9771,6 @@
|
|
|
9619
9771
|
const target = options.to.position;
|
|
9620
9772
|
if (target === 'center') {
|
|
9621
9773
|
const activePanel = from.activePanel;
|
|
9622
|
-
const targetActivePanel = to.activePanel;
|
|
9623
9774
|
const panels = this.movingLock(() => [...from.panels].map((p) => from.model.removePanel(p.id, {
|
|
9624
9775
|
skipSetActive: true,
|
|
9625
9776
|
})));
|
|
@@ -9629,22 +9780,21 @@
|
|
|
9629
9780
|
this.movingLock(() => {
|
|
9630
9781
|
for (const panel of panels) {
|
|
9631
9782
|
to.model.openPanel(panel, {
|
|
9632
|
-
skipSetActive:
|
|
9783
|
+
skipSetActive: panel !== activePanel,
|
|
9633
9784
|
skipSetGroupActive: true,
|
|
9634
9785
|
});
|
|
9635
9786
|
}
|
|
9636
9787
|
});
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9788
|
+
// Ensure group becomes active after move
|
|
9789
|
+
if (options.skipSetActive !== true) {
|
|
9790
|
+
// For center moves (merges), we need to ensure the target group is active
|
|
9791
|
+
// unless explicitly told not to (skipSetActive: true)
|
|
9792
|
+
this.doSetGroupAndPanelActive(to);
|
|
9642
9793
|
}
|
|
9643
|
-
else if (
|
|
9644
|
-
//
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
});
|
|
9794
|
+
else if (!this.activePanel) {
|
|
9795
|
+
// Even with skipSetActive: true, ensure there's an active panel if none exists
|
|
9796
|
+
// This maintains basic functionality while respecting skipSetActive
|
|
9797
|
+
this.doSetGroupAndPanelActive(to);
|
|
9648
9798
|
}
|
|
9649
9799
|
}
|
|
9650
9800
|
else {
|
|
@@ -9674,20 +9824,26 @@
|
|
|
9674
9824
|
if (selectedPopoutGroup.referenceGroup) {
|
|
9675
9825
|
const referenceGroup = this.getPanel(selectedPopoutGroup.referenceGroup);
|
|
9676
9826
|
if (referenceGroup && !referenceGroup.api.isVisible) {
|
|
9677
|
-
this.doRemoveGroup(referenceGroup, {
|
|
9827
|
+
this.doRemoveGroup(referenceGroup, {
|
|
9828
|
+
skipActive: true,
|
|
9829
|
+
});
|
|
9678
9830
|
}
|
|
9679
9831
|
}
|
|
9680
9832
|
// Manually dispose the window without triggering restoration
|
|
9681
9833
|
selectedPopoutGroup.window.dispose();
|
|
9682
9834
|
// Update group's location and containers for target
|
|
9683
9835
|
if (to.api.location.type === 'grid') {
|
|
9684
|
-
from.model.renderContainer =
|
|
9685
|
-
|
|
9836
|
+
from.model.renderContainer =
|
|
9837
|
+
this.overlayRenderContainer;
|
|
9838
|
+
from.model.dropTargetContainer =
|
|
9839
|
+
this.rootDropTargetContainer;
|
|
9686
9840
|
from.model.location = { type: 'grid' };
|
|
9687
9841
|
}
|
|
9688
9842
|
else if (to.api.location.type === 'floating') {
|
|
9689
|
-
from.model.renderContainer =
|
|
9690
|
-
|
|
9843
|
+
from.model.renderContainer =
|
|
9844
|
+
this.overlayRenderContainer;
|
|
9845
|
+
from.model.dropTargetContainer =
|
|
9846
|
+
this.rootDropTargetContainer;
|
|
9691
9847
|
from.model.location = { type: 'floating' };
|
|
9692
9848
|
}
|
|
9693
9849
|
break;
|
|
@@ -9755,8 +9911,12 @@
|
|
|
9755
9911
|
from.panels.forEach((panel) => {
|
|
9756
9912
|
this._onDidMovePanel.fire({ panel, from });
|
|
9757
9913
|
});
|
|
9758
|
-
|
|
9759
|
-
|
|
9914
|
+
// Ensure group becomes active after move
|
|
9915
|
+
if (options.skipSetActive === false) {
|
|
9916
|
+
// Only activate when explicitly requested (skipSetActive: false)
|
|
9917
|
+
// Use 'to' group for non-center moves since 'from' may have been destroyed
|
|
9918
|
+
const targetGroup = to !== null && to !== void 0 ? to : from;
|
|
9919
|
+
this.doSetGroupAndPanelActive(targetGroup);
|
|
9760
9920
|
}
|
|
9761
9921
|
}
|
|
9762
9922
|
doSetGroupActive(group) {
|