dockview-core 2.1.0 → 2.1.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.
- package/dist/cjs/dockview/dockviewComponent.d.ts +1 -0
- package/dist/cjs/dockview/dockviewComponent.js +42 -15
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +1 -1
- package/dist/cjs/dockview/strictEventsSequencing.d.ts +7 -0
- package/dist/cjs/dockview/strictEventsSequencing.js +63 -0
- package/dist/cjs/gridview/baseComponentGridview.js +1 -1
- package/dist/dockview-core.amd.js +81 -16
- 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 +81 -16
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +81 -16
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +81 -16
- 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 +81 -16
- 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 +81 -16
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/dockview/dockviewComponent.d.ts +1 -0
- package/dist/esm/dockview/dockviewComponent.js +38 -13
- package/dist/esm/dockview/dockviewGroupPanelModel.js +1 -1
- package/dist/esm/dockview/strictEventsSequencing.d.ts +7 -0
- package/dist/esm/dockview/strictEventsSequencing.js +41 -0
- package/dist/esm/gridview/baseComponentGridview.js +1 -1
- package/package.json +1 -1
|
@@ -208,6 +208,7 @@ export declare class DockviewComponent extends BaseGrid<DockviewGroupPanel> impl
|
|
|
208
208
|
get gap(): number;
|
|
209
209
|
get floatingGroups(): DockviewFloatingGroupPanel[];
|
|
210
210
|
constructor(parentElement: HTMLElement, options: DockviewComponentOptions);
|
|
211
|
+
dispose(): void;
|
|
211
212
|
setVisible(panel: DockviewGroupPanel, visible: boolean): void;
|
|
212
213
|
addPopoutGroup(itemToPopout: DockviewPanel | DockviewGroupPanel, options?: DockviewPopoutGroupOptions): Promise<boolean>;
|
|
213
214
|
addFloatingGroup(item: DockviewPanel | DockviewGroupPanel, options?: FloatingGroupOptionsInternal): void;
|
|
@@ -86,6 +86,7 @@ var dockviewFloatingGroupPanel_1 = require("./dockviewFloatingGroupPanel");
|
|
|
86
86
|
var constants_1 = require("../constants");
|
|
87
87
|
var overlayRenderContainer_1 = require("../overlay/overlayRenderContainer");
|
|
88
88
|
var popoutWindow_1 = require("../popoutWindow");
|
|
89
|
+
var strictEventsSequencing_1 = require("./strictEventsSequencing");
|
|
89
90
|
var DEFAULT_ROOT_OVERLAY_MODEL = {
|
|
90
91
|
activationSize: { type: 'pixels', value: 10 },
|
|
91
92
|
size: { type: 'pixels', value: 20 },
|
|
@@ -158,7 +159,10 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
158
159
|
_this.overlayRenderContainer = new overlayRenderContainer_1.OverlayRenderContainer(_this.gridview.element, _this);
|
|
159
160
|
(0, dom_1.toggleClass)(_this.gridview.element, 'dv-dockview', true);
|
|
160
161
|
(0, dom_1.toggleClass)(_this.element, 'dv-debug', !!options.debug);
|
|
161
|
-
|
|
162
|
+
if (options.debug) {
|
|
163
|
+
_this.addDisposables(new strictEventsSequencing_1.StrictEventsSequencing(_this));
|
|
164
|
+
}
|
|
165
|
+
_this.addDisposables(_this.overlayRenderContainer, _this._onWillDragPanel, _this._onWillDragGroup, _this._onWillShowOverlay, _this._onDidActivePanelChange, _this._onDidAddPanel, _this._onDidRemovePanel, _this._onDidLayoutFromJSON, _this._onDidDrop, _this._onWillDrop, _this._onDidMovePanel, _this._onDidAddGroup, _this._onDidRemoveGroup, _this._onDidActiveGroupChange, _this._onUnhandledDragOverEvent, _this._onDidMaximizedGroupChange, _this.onDidViewVisibilityChangeMicroTaskQueue(function () {
|
|
162
166
|
_this.updateWatermark();
|
|
163
167
|
}), _this.onDidAdd(function (event) {
|
|
164
168
|
if (!_this._moving) {
|
|
@@ -365,6 +369,10 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
365
369
|
enumerable: false,
|
|
366
370
|
configurable: true
|
|
367
371
|
});
|
|
372
|
+
DockviewComponent.prototype.dispose = function () {
|
|
373
|
+
this.clear(); // explicitly clear the layout before cleaning up
|
|
374
|
+
_super.prototype.dispose.call(this);
|
|
375
|
+
};
|
|
368
376
|
DockviewComponent.prototype.setVisible = function (panel, visible) {
|
|
369
377
|
switch (panel.api.location.type) {
|
|
370
378
|
case 'grid':
|
|
@@ -424,6 +432,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
424
432
|
return _window
|
|
425
433
|
.open()
|
|
426
434
|
.then(function (popoutContainer) {
|
|
435
|
+
var _a;
|
|
427
436
|
if (_window.isDisposed) {
|
|
428
437
|
return false;
|
|
429
438
|
}
|
|
@@ -456,6 +465,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
456
465
|
}
|
|
457
466
|
group.model.renderContainer = overlayRenderContainer;
|
|
458
467
|
group.layout(_window.window.innerWidth, _window.window.innerHeight);
|
|
468
|
+
var floatingBox;
|
|
459
469
|
if (!(options === null || options === void 0 ? void 0 : options.overridePopoutGroup) && isGroupAddedToDom) {
|
|
460
470
|
if (itemToPopout instanceof dockviewPanel_1.DockviewPanel) {
|
|
461
471
|
_this.movingLock(function () {
|
|
@@ -476,6 +486,11 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
476
486
|
break;
|
|
477
487
|
case 'floating':
|
|
478
488
|
case 'popout':
|
|
489
|
+
floatingBox = (_a = _this._floatingGroups
|
|
490
|
+
.find(function (value) {
|
|
491
|
+
return value.group.api.id ===
|
|
492
|
+
itemToPopout.api.id;
|
|
493
|
+
})) === null || _a === void 0 ? void 0 : _a.overlay.toJSON();
|
|
479
494
|
_this.removeGroup(referenceGroup);
|
|
480
495
|
break;
|
|
481
496
|
}
|
|
@@ -548,18 +563,30 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
548
563
|
}
|
|
549
564
|
}
|
|
550
565
|
else if (_this.getPanel(group.id)) {
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
566
|
+
var removedGroup_1 = group;
|
|
567
|
+
if (floatingBox) {
|
|
568
|
+
_this.addFloatingGroup(removedGroup_1, {
|
|
569
|
+
height: floatingBox.height,
|
|
570
|
+
width: floatingBox.width,
|
|
571
|
+
position: floatingBox,
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
else {
|
|
575
|
+
_this.doRemoveGroup(removedGroup_1, {
|
|
576
|
+
skipDispose: true,
|
|
577
|
+
skipActive: true,
|
|
578
|
+
skipPopoutReturn: true,
|
|
579
|
+
});
|
|
580
|
+
removedGroup_1.model.renderContainer =
|
|
581
|
+
_this.overlayRenderContainer;
|
|
582
|
+
removedGroup_1.model.location = { type: 'grid' };
|
|
583
|
+
returnedGroup = removedGroup_1;
|
|
584
|
+
_this.movingLock(function () {
|
|
585
|
+
// suppress group add events since the group already exists
|
|
586
|
+
_this.doAddGroup(removedGroup_1, [0]);
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
_this.doSetGroupAndPanelActive(removedGroup_1);
|
|
563
590
|
}
|
|
564
591
|
}));
|
|
565
592
|
_this._popoutGroups.push(value);
|
|
@@ -942,6 +969,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
942
969
|
locked: !!locked,
|
|
943
970
|
hideHeader: !!hideHeader,
|
|
944
971
|
});
|
|
972
|
+
_this._onDidAddGroup.fire(group);
|
|
945
973
|
var createdPanels = [];
|
|
946
974
|
try {
|
|
947
975
|
for (var views_1 = __values(views), views_1_1 = views_1.next(); !views_1_1.done; views_1_1 = views_1.next()) {
|
|
@@ -962,7 +990,6 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
962
990
|
}
|
|
963
991
|
finally { if (e_12) throw e_12.error; }
|
|
964
992
|
}
|
|
965
|
-
_this._onDidAddGroup.fire(group);
|
|
966
993
|
for (var i = 0; i < views.length; i++) {
|
|
967
994
|
var panel = createdPanels[i];
|
|
968
995
|
var isActive = typeof activeView === 'string' &&
|
|
@@ -1465,7 +1492,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
1465
1492
|
var refGroup = selectedGroup.referenceGroup
|
|
1466
1493
|
? this.getPanel(selectedGroup.referenceGroup)
|
|
1467
1494
|
: undefined;
|
|
1468
|
-
if (refGroup) {
|
|
1495
|
+
if (refGroup && refGroup.panels.length === 0) {
|
|
1469
1496
|
this.removeGroup(refGroup);
|
|
1470
1497
|
}
|
|
1471
1498
|
}
|
|
@@ -262,7 +262,7 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
262
262
|
group: _this.groupPanel,
|
|
263
263
|
getData: dataTransfer_1.getPanelData,
|
|
264
264
|
}));
|
|
265
|
-
}), _this._onMove, _this._onDidChange, _this._onDidDrop, _this._onWillDrop, _this._onDidAddPanel, _this._onDidRemovePanel, _this._onDidActivePanelChange, _this._onUnhandledDragOverEvent);
|
|
265
|
+
}), _this._onMove, _this._onDidChange, _this._onDidDrop, _this._onWillDrop, _this._onDidAddPanel, _this._onDidRemovePanel, _this._onDidActivePanelChange, _this._onUnhandledDragOverEvent, _this._onDidPanelTitleChange, _this._onDidPanelParametersChange);
|
|
266
266
|
return _this;
|
|
267
267
|
}
|
|
268
268
|
Object.defineProperty(DockviewGroupPanelModel.prototype, "element", {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CompositeDisposable } from '../lifecycle';
|
|
2
|
+
import { DockviewComponent } from './dockviewComponent';
|
|
3
|
+
export declare class StrictEventsSequencing extends CompositeDisposable {
|
|
4
|
+
private readonly accessor;
|
|
5
|
+
constructor(accessor: DockviewComponent);
|
|
6
|
+
private init;
|
|
7
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.StrictEventsSequencing = void 0;
|
|
19
|
+
var lifecycle_1 = require("../lifecycle");
|
|
20
|
+
var StrictEventsSequencing = /** @class */ (function (_super) {
|
|
21
|
+
__extends(StrictEventsSequencing, _super);
|
|
22
|
+
function StrictEventsSequencing(accessor) {
|
|
23
|
+
var _this = _super.call(this) || this;
|
|
24
|
+
_this.accessor = accessor;
|
|
25
|
+
_this.init();
|
|
26
|
+
return _this;
|
|
27
|
+
}
|
|
28
|
+
StrictEventsSequencing.prototype.init = function () {
|
|
29
|
+
var panels = new Set();
|
|
30
|
+
var groups = new Set();
|
|
31
|
+
this.addDisposables(this.accessor.onDidAddPanel(function (panel) {
|
|
32
|
+
if (panels.has(panel.api.id)) {
|
|
33
|
+
throw new Error("dockview: Invalid event sequence. [onDidAddPanel] called for panel ".concat(panel.api.id, " but panel already exists"));
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
panels.add(panel.api.id);
|
|
37
|
+
}
|
|
38
|
+
}), this.accessor.onDidRemovePanel(function (panel) {
|
|
39
|
+
if (!panels.has(panel.api.id)) {
|
|
40
|
+
throw new Error("dockview: Invalid event sequence. [onDidRemovePanel] called for panel ".concat(panel.api.id, " but panel does not exists"));
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
panels.delete(panel.api.id);
|
|
44
|
+
}
|
|
45
|
+
}), this.accessor.onDidAddGroup(function (group) {
|
|
46
|
+
if (groups.has(group.api.id)) {
|
|
47
|
+
throw new Error("dockview: Invalid event sequence. [onDidAddGroup] called for group ".concat(group.api.id, " but group already exists"));
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
groups.add(group.api.id);
|
|
51
|
+
}
|
|
52
|
+
}), this.accessor.onDidRemoveGroup(function (group) {
|
|
53
|
+
if (!groups.has(group.api.id)) {
|
|
54
|
+
throw new Error("dockview: Invalid event sequence. [onDidRemoveGroup] called for group ".concat(group.api.id, " but group does not exists"));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
groups.delete(group.api.id);
|
|
58
|
+
}
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
return StrictEventsSequencing;
|
|
62
|
+
}(lifecycle_1.CompositeDisposable));
|
|
63
|
+
exports.StrictEventsSequencing = StrictEventsSequencing;
|
|
@@ -95,7 +95,7 @@ var BaseGrid = /** @class */ (function (_super) {
|
|
|
95
95
|
_this._bufferOnDidLayoutChange.fire();
|
|
96
96
|
}), events_1.Event.any(_this.onDidAdd, _this.onDidRemove, _this.onDidActiveChange)(function () {
|
|
97
97
|
_this._bufferOnDidLayoutChange.fire();
|
|
98
|
-
}), _this._bufferOnDidLayoutChange);
|
|
98
|
+
}), _this._onDidMaximizedChange, _this._onDidViewVisibilityChangeMicroTaskQueue, _this._bufferOnDidLayoutChange);
|
|
99
99
|
return _this;
|
|
100
100
|
}
|
|
101
101
|
Object.defineProperty(BaseGrid.prototype, "id", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 2.1.
|
|
3
|
+
* @version 2.1.2
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -2796,7 +2796,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2796
2796
|
this._bufferOnDidLayoutChange.fire();
|
|
2797
2797
|
}), exports.DockviewEvent.any(this.onDidAdd, this.onDidRemove, this.onDidActiveChange)(() => {
|
|
2798
2798
|
this._bufferOnDidLayoutChange.fire();
|
|
2799
|
-
}), this._bufferOnDidLayoutChange);
|
|
2799
|
+
}), this._onDidMaximizedChange, this._onDidViewVisibilityChangeMicroTaskQueue, this._bufferOnDidLayoutChange);
|
|
2800
2800
|
}
|
|
2801
2801
|
setVisible(panel, visible) {
|
|
2802
2802
|
this.gridview.setViewVisible(getGridLocation(panel.element), visible);
|
|
@@ -5397,7 +5397,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5397
5397
|
group: this.groupPanel,
|
|
5398
5398
|
getData: getPanelData,
|
|
5399
5399
|
}));
|
|
5400
|
-
}), this._onMove, this._onDidChange, this._onDidDrop, this._onWillDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange, this._onUnhandledDragOverEvent);
|
|
5400
|
+
}), this._onMove, this._onDidChange, this._onDidDrop, this._onWillDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange, this._onUnhandledDragOverEvent, this._onDidPanelTitleChange, this._onDidPanelParametersChange);
|
|
5401
5401
|
}
|
|
5402
5402
|
focusContent() {
|
|
5403
5403
|
this.contentContainer.element.focus();
|
|
@@ -7399,6 +7399,47 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7399
7399
|
}
|
|
7400
7400
|
}
|
|
7401
7401
|
|
|
7402
|
+
class StrictEventsSequencing extends CompositeDisposable {
|
|
7403
|
+
constructor(accessor) {
|
|
7404
|
+
super();
|
|
7405
|
+
this.accessor = accessor;
|
|
7406
|
+
this.init();
|
|
7407
|
+
}
|
|
7408
|
+
init() {
|
|
7409
|
+
const panels = new Set();
|
|
7410
|
+
const groups = new Set();
|
|
7411
|
+
this.addDisposables(this.accessor.onDidAddPanel((panel) => {
|
|
7412
|
+
if (panels.has(panel.api.id)) {
|
|
7413
|
+
throw new Error(`dockview: Invalid event sequence. [onDidAddPanel] called for panel ${panel.api.id} but panel already exists`);
|
|
7414
|
+
}
|
|
7415
|
+
else {
|
|
7416
|
+
panels.add(panel.api.id);
|
|
7417
|
+
}
|
|
7418
|
+
}), this.accessor.onDidRemovePanel((panel) => {
|
|
7419
|
+
if (!panels.has(panel.api.id)) {
|
|
7420
|
+
throw new Error(`dockview: Invalid event sequence. [onDidRemovePanel] called for panel ${panel.api.id} but panel does not exists`);
|
|
7421
|
+
}
|
|
7422
|
+
else {
|
|
7423
|
+
panels.delete(panel.api.id);
|
|
7424
|
+
}
|
|
7425
|
+
}), this.accessor.onDidAddGroup((group) => {
|
|
7426
|
+
if (groups.has(group.api.id)) {
|
|
7427
|
+
throw new Error(`dockview: Invalid event sequence. [onDidAddGroup] called for group ${group.api.id} but group already exists`);
|
|
7428
|
+
}
|
|
7429
|
+
else {
|
|
7430
|
+
groups.add(group.api.id);
|
|
7431
|
+
}
|
|
7432
|
+
}), this.accessor.onDidRemoveGroup((group) => {
|
|
7433
|
+
if (!groups.has(group.api.id)) {
|
|
7434
|
+
throw new Error(`dockview: Invalid event sequence. [onDidRemoveGroup] called for group ${group.api.id} but group does not exists`);
|
|
7435
|
+
}
|
|
7436
|
+
else {
|
|
7437
|
+
groups.delete(group.api.id);
|
|
7438
|
+
}
|
|
7439
|
+
}));
|
|
7440
|
+
}
|
|
7441
|
+
}
|
|
7442
|
+
|
|
7402
7443
|
const DEFAULT_ROOT_OVERLAY_MODEL = {
|
|
7403
7444
|
activationSize: { type: 'pixels', value: 10 },
|
|
7404
7445
|
size: { type: 'pixels', value: 20 },
|
|
@@ -7502,7 +7543,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7502
7543
|
this.overlayRenderContainer = new OverlayRenderContainer(this.gridview.element, this);
|
|
7503
7544
|
toggleClass(this.gridview.element, 'dv-dockview', true);
|
|
7504
7545
|
toggleClass(this.element, 'dv-debug', !!options.debug);
|
|
7505
|
-
|
|
7546
|
+
if (options.debug) {
|
|
7547
|
+
this.addDisposables(new StrictEventsSequencing(this));
|
|
7548
|
+
}
|
|
7549
|
+
this.addDisposables(this.overlayRenderContainer, this._onWillDragPanel, this._onWillDragGroup, this._onWillShowOverlay, this._onDidActivePanelChange, this._onDidAddPanel, this._onDidRemovePanel, this._onDidLayoutFromJSON, this._onDidDrop, this._onWillDrop, this._onDidMovePanel, this._onDidAddGroup, this._onDidRemoveGroup, this._onDidActiveGroupChange, this._onUnhandledDragOverEvent, this._onDidMaximizedGroupChange, this.onDidViewVisibilityChangeMicroTaskQueue(() => {
|
|
7506
7550
|
this.updateWatermark();
|
|
7507
7551
|
}), this.onDidAdd((event) => {
|
|
7508
7552
|
if (!this._moving) {
|
|
@@ -7619,6 +7663,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7619
7663
|
this._api = new DockviewApi(this);
|
|
7620
7664
|
this.updateWatermark();
|
|
7621
7665
|
}
|
|
7666
|
+
dispose() {
|
|
7667
|
+
this.clear(); // explicitly clear the layout before cleaning up
|
|
7668
|
+
super.dispose();
|
|
7669
|
+
}
|
|
7622
7670
|
setVisible(panel, visible) {
|
|
7623
7671
|
switch (panel.api.location.type) {
|
|
7624
7672
|
case 'grid':
|
|
@@ -7677,6 +7725,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7677
7725
|
return _window
|
|
7678
7726
|
.open()
|
|
7679
7727
|
.then((popoutContainer) => {
|
|
7728
|
+
var _a;
|
|
7680
7729
|
if (_window.isDisposed) {
|
|
7681
7730
|
return false;
|
|
7682
7731
|
}
|
|
@@ -7709,6 +7758,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7709
7758
|
}
|
|
7710
7759
|
group.model.renderContainer = overlayRenderContainer;
|
|
7711
7760
|
group.layout(_window.window.innerWidth, _window.window.innerHeight);
|
|
7761
|
+
let floatingBox;
|
|
7712
7762
|
if (!(options === null || options === void 0 ? void 0 : options.overridePopoutGroup) && isGroupAddedToDom) {
|
|
7713
7763
|
if (itemToPopout instanceof DockviewPanel) {
|
|
7714
7764
|
this.movingLock(() => {
|
|
@@ -7727,6 +7777,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7727
7777
|
break;
|
|
7728
7778
|
case 'floating':
|
|
7729
7779
|
case 'popout':
|
|
7780
|
+
floatingBox = (_a = this._floatingGroups
|
|
7781
|
+
.find((value) => value.group.api.id ===
|
|
7782
|
+
itemToPopout.api.id)) === null || _a === void 0 ? void 0 : _a.overlay.toJSON();
|
|
7730
7783
|
this.removeGroup(referenceGroup);
|
|
7731
7784
|
break;
|
|
7732
7785
|
}
|
|
@@ -7797,17 +7850,29 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7797
7850
|
}
|
|
7798
7851
|
}
|
|
7799
7852
|
else if (this.getPanel(group.id)) {
|
|
7800
|
-
this.doRemoveGroup(group, {
|
|
7801
|
-
skipDispose: true,
|
|
7802
|
-
skipActive: true,
|
|
7803
|
-
skipPopoutReturn: true,
|
|
7804
|
-
});
|
|
7805
7853
|
const removedGroup = group;
|
|
7806
|
-
|
|
7807
|
-
this.
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7854
|
+
if (floatingBox) {
|
|
7855
|
+
this.addFloatingGroup(removedGroup, {
|
|
7856
|
+
height: floatingBox.height,
|
|
7857
|
+
width: floatingBox.width,
|
|
7858
|
+
position: floatingBox,
|
|
7859
|
+
});
|
|
7860
|
+
}
|
|
7861
|
+
else {
|
|
7862
|
+
this.doRemoveGroup(removedGroup, {
|
|
7863
|
+
skipDispose: true,
|
|
7864
|
+
skipActive: true,
|
|
7865
|
+
skipPopoutReturn: true,
|
|
7866
|
+
});
|
|
7867
|
+
removedGroup.model.renderContainer =
|
|
7868
|
+
this.overlayRenderContainer;
|
|
7869
|
+
removedGroup.model.location = { type: 'grid' };
|
|
7870
|
+
returnedGroup = removedGroup;
|
|
7871
|
+
this.movingLock(() => {
|
|
7872
|
+
// suppress group add events since the group already exists
|
|
7873
|
+
this.doAddGroup(removedGroup, [0]);
|
|
7874
|
+
});
|
|
7875
|
+
}
|
|
7811
7876
|
this.doSetGroupAndPanelActive(removedGroup);
|
|
7812
7877
|
}
|
|
7813
7878
|
}));
|
|
@@ -8155,6 +8220,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8155
8220
|
locked: !!locked,
|
|
8156
8221
|
hideHeader: !!hideHeader,
|
|
8157
8222
|
});
|
|
8223
|
+
this._onDidAddGroup.fire(group);
|
|
8158
8224
|
const createdPanels = [];
|
|
8159
8225
|
for (const child of views) {
|
|
8160
8226
|
/**
|
|
@@ -8165,7 +8231,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8165
8231
|
const panel = this._deserializer.fromJSON(panels[child], group);
|
|
8166
8232
|
createdPanels.push(panel);
|
|
8167
8233
|
}
|
|
8168
|
-
this._onDidAddGroup.fire(group);
|
|
8169
8234
|
for (let i = 0; i < views.length; i++) {
|
|
8170
8235
|
const panel = createdPanels[i];
|
|
8171
8236
|
const isActive = typeof activeView === 'string' &&
|
|
@@ -8564,7 +8629,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8564
8629
|
const refGroup = selectedGroup.referenceGroup
|
|
8565
8630
|
? this.getPanel(selectedGroup.referenceGroup)
|
|
8566
8631
|
: undefined;
|
|
8567
|
-
if (refGroup) {
|
|
8632
|
+
if (refGroup && refGroup.panels.length === 0) {
|
|
8568
8633
|
this.removeGroup(refGroup);
|
|
8569
8634
|
}
|
|
8570
8635
|
}
|