dockview-core 1.8.3 → 1.8.4
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/components/titlebar/tabsContainer.d.ts +4 -0
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts.map +1 -1
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +16 -0
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js.map +1 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +1 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts.map +1 -1
- package/dist/cjs/dockview/dockviewComponent.js +232 -78
- package/dist/cjs/dockview/dockviewComponent.js.map +1 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +1 -0
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts.map +1 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +10 -0
- package/dist/cjs/dockview/dockviewGroupPanelModel.js.map +1 -1
- package/dist/cjs/dockview/options.d.ts +1 -0
- package/dist/cjs/dockview/options.d.ts.map +1 -1
- package/dist/cjs/dockview/options.js.map +1 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts.map +1 -1
- package/dist/cjs/gridview/baseComponentGridview.js.map +1 -1
- package/dist/cjs/gridview/branchNode.d.ts.map +1 -1
- package/dist/cjs/gridview/branchNode.js +1 -0
- package/dist/cjs/gridview/branchNode.js.map +1 -1
- package/dist/cjs/gridview/gridview.d.ts.map +1 -1
- package/dist/cjs/gridview/gridview.js +8 -0
- package/dist/cjs/gridview/gridview.js.map +1 -1
- package/dist/cjs/gridview/gridviewComponent.d.ts.map +1 -1
- package/dist/cjs/gridview/gridviewComponent.js +71 -39
- package/dist/cjs/gridview/gridviewComponent.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/resizable.d.ts.map +1 -1
- package/dist/cjs/resizable.js +8 -0
- package/dist/cjs/resizable.js.map +1 -1
- package/dist/cjs/splitview/splitview.d.ts.map +1 -1
- package/dist/cjs/splitview/splitview.js +11 -1
- package/dist/cjs/splitview/splitview.js.map +1 -1
- package/dist/dockview-core.amd.js +212 -84
- 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 +212 -84
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +212 -84
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +212 -84
- 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 +212 -84
- 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 +212 -84
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +4 -0
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts.map +1 -1
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +16 -0
- package/dist/esm/dockview/components/titlebar/tabsContainer.js.map +1 -1
- package/dist/esm/dockview/dockviewComponent.d.ts +1 -1
- package/dist/esm/dockview/dockviewComponent.d.ts.map +1 -1
- package/dist/esm/dockview/dockviewComponent.js +161 -47
- package/dist/esm/dockview/dockviewComponent.js.map +1 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +1 -0
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts.map +1 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.js +10 -0
- package/dist/esm/dockview/dockviewGroupPanelModel.js.map +1 -1
- package/dist/esm/dockview/options.d.ts +1 -0
- package/dist/esm/dockview/options.d.ts.map +1 -1
- package/dist/esm/dockview/options.js.map +1 -1
- package/dist/esm/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/esm/gridview/baseComponentGridview.d.ts.map +1 -1
- package/dist/esm/gridview/baseComponentGridview.js.map +1 -1
- package/dist/esm/gridview/branchNode.d.ts.map +1 -1
- package/dist/esm/gridview/branchNode.js +1 -0
- package/dist/esm/gridview/branchNode.js.map +1 -1
- package/dist/esm/gridview/gridview.d.ts.map +1 -1
- package/dist/esm/gridview/gridview.js +8 -0
- package/dist/esm/gridview/gridview.js.map +1 -1
- package/dist/esm/gridview/gridviewComponent.d.ts.map +1 -1
- package/dist/esm/gridview/gridviewComponent.js +56 -35
- package/dist/esm/gridview/gridviewComponent.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/resizable.d.ts.map +1 -1
- package/dist/esm/resizable.js +8 -0
- package/dist/esm/resizable.js.map +1 -1
- package/dist/esm/splitview/splitview.d.ts.map +1 -1
- package/dist/esm/splitview/splitview.js +11 -1
- package/dist/esm/splitview/splitview.js.map +1 -1
- package/package.json +3 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 1.8.
|
|
3
|
+
* @version 1.8.4
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -872,7 +872,17 @@
|
|
|
872
872
|
size = typeof size === 'number' ? size : item.size;
|
|
873
873
|
size = clamp(size, item.minimumSize, item.maximumSize);
|
|
874
874
|
item.size = size;
|
|
875
|
-
this.
|
|
875
|
+
const indexes = range(this.viewItems.length).filter((i) => i !== index);
|
|
876
|
+
const lowPriorityIndexes = [
|
|
877
|
+
...indexes.filter((i) => this.viewItems[i].priority === exports.LayoutPriority.Low),
|
|
878
|
+
index,
|
|
879
|
+
];
|
|
880
|
+
const highPriorityIndexes = indexes.filter((i) => this.viewItems[i].priority === exports.LayoutPriority.High);
|
|
881
|
+
/**
|
|
882
|
+
* add this view we are changing to the low-index list since we have determined the size
|
|
883
|
+
* here and don't want it changed
|
|
884
|
+
*/
|
|
885
|
+
this.relayout([...lowPriorityIndexes, index], highPriorityIndexes);
|
|
876
886
|
}
|
|
877
887
|
addView(view, size = { type: 'distribute' }, index = this.viewItems.length, skipLayout) {
|
|
878
888
|
const container = document.createElement('div');
|
|
@@ -1629,6 +1639,7 @@
|
|
|
1629
1639
|
orientation: this.orientation,
|
|
1630
1640
|
descriptor,
|
|
1631
1641
|
proportionalLayout,
|
|
1642
|
+
styles,
|
|
1632
1643
|
});
|
|
1633
1644
|
}
|
|
1634
1645
|
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
@@ -2140,6 +2151,14 @@
|
|
|
2140
2151
|
const child = sibling.children[i];
|
|
2141
2152
|
grandParent.addChild(child, child.size, parentIndex + i);
|
|
2142
2153
|
}
|
|
2154
|
+
/**
|
|
2155
|
+
* clean down the branch node since we need to dipose of it and
|
|
2156
|
+
* when .dispose() it called on a branch it will dispose of any
|
|
2157
|
+
* views it is holding onto.
|
|
2158
|
+
*/
|
|
2159
|
+
while (sibling.children.length > 0) {
|
|
2160
|
+
sibling.removeChild(0);
|
|
2161
|
+
}
|
|
2143
2162
|
}
|
|
2144
2163
|
else {
|
|
2145
2164
|
// otherwise create a new leaf node and add that to the grandparent
|
|
@@ -3198,6 +3217,19 @@
|
|
|
3198
3217
|
this.leftActions = element;
|
|
3199
3218
|
}
|
|
3200
3219
|
}
|
|
3220
|
+
setPrefixActionsElement(element) {
|
|
3221
|
+
if (this.preActions === element) {
|
|
3222
|
+
return;
|
|
3223
|
+
}
|
|
3224
|
+
if (this.preActions) {
|
|
3225
|
+
this.preActions.remove();
|
|
3226
|
+
this.preActions = undefined;
|
|
3227
|
+
}
|
|
3228
|
+
if (element) {
|
|
3229
|
+
this.preActionsContainer.appendChild(element);
|
|
3230
|
+
this.preActions = element;
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3201
3233
|
get element() {
|
|
3202
3234
|
return this._element;
|
|
3203
3235
|
}
|
|
@@ -3238,9 +3270,12 @@
|
|
|
3238
3270
|
this.rightActionsContainer.className = 'right-actions-container';
|
|
3239
3271
|
this.leftActionsContainer = document.createElement('div');
|
|
3240
3272
|
this.leftActionsContainer.className = 'left-actions-container';
|
|
3273
|
+
this.preActionsContainer = document.createElement('div');
|
|
3274
|
+
this.preActionsContainer.className = 'pre-actions-container';
|
|
3241
3275
|
this.tabContainer = document.createElement('div');
|
|
3242
3276
|
this.tabContainer.className = 'tabs-container';
|
|
3243
3277
|
this.voidContainer = new VoidContainer(this.accessor, this.group);
|
|
3278
|
+
this._element.appendChild(this.preActionsContainer);
|
|
3244
3279
|
this._element.appendChild(this.tabContainer);
|
|
3245
3280
|
this._element.appendChild(this.leftActionsContainer);
|
|
3246
3281
|
this._element.appendChild(this.voidContainer.element);
|
|
@@ -3530,6 +3565,16 @@
|
|
|
3530
3565
|
});
|
|
3531
3566
|
this.tabsContainer.setLeftActionsElement(this._leftHeaderActions.element);
|
|
3532
3567
|
}
|
|
3568
|
+
if (this.accessor.options.createPrefixHeaderActionsElement) {
|
|
3569
|
+
this._prefixHeaderActions =
|
|
3570
|
+
this.accessor.options.createPrefixHeaderActionsElement(this.groupPanel);
|
|
3571
|
+
this.addDisposables(this._prefixHeaderActions);
|
|
3572
|
+
this._prefixHeaderActions.init({
|
|
3573
|
+
containerApi: new DockviewApi(this.accessor),
|
|
3574
|
+
api: this.groupPanel.api,
|
|
3575
|
+
});
|
|
3576
|
+
this.tabsContainer.setPrefixActionsElement(this._prefixHeaderActions.element);
|
|
3577
|
+
}
|
|
3533
3578
|
}
|
|
3534
3579
|
indexOf(panel) {
|
|
3535
3580
|
return this.tabsContainer.indexOf(panel.id);
|
|
@@ -3872,6 +3917,14 @@
|
|
|
3872
3917
|
*/
|
|
3873
3918
|
return;
|
|
3874
3919
|
}
|
|
3920
|
+
if (!document.body.contains(this._element)) {
|
|
3921
|
+
/**
|
|
3922
|
+
* since the event is dispatched through requestAnimationFrame there is a small chance
|
|
3923
|
+
* the component is no longer attached to the DOM, if that is the case the dimensions
|
|
3924
|
+
* are mostly likely all zero and meaningless. we should skip this case.
|
|
3925
|
+
*/
|
|
3926
|
+
return;
|
|
3927
|
+
}
|
|
3875
3928
|
const { width, height } = entry.contentRect;
|
|
3876
3929
|
this.layout(width, height);
|
|
3877
3930
|
}));
|
|
@@ -5900,61 +5953,114 @@
|
|
|
5900
5953
|
fromJSON(data) {
|
|
5901
5954
|
var _a;
|
|
5902
5955
|
this.clear();
|
|
5956
|
+
if (typeof data !== 'object' || data === null) {
|
|
5957
|
+
throw new Error('serialized layout must be a non-null object');
|
|
5958
|
+
}
|
|
5903
5959
|
const { grid, panels, activeGroup } = data;
|
|
5904
5960
|
if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
|
|
5905
5961
|
throw new Error('root must be of type branch');
|
|
5906
5962
|
}
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
const
|
|
5912
|
-
|
|
5913
|
-
id
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
const isActive = typeof activeView === 'string' && activeView === panel.id;
|
|
5921
|
-
group.model.openPanel(panel, {
|
|
5922
|
-
skipSetPanelActive: !isActive,
|
|
5923
|
-
skipSetGroupActive: true,
|
|
5963
|
+
try {
|
|
5964
|
+
// take note of the existing dimensions
|
|
5965
|
+
const width = this.width;
|
|
5966
|
+
const height = this.height;
|
|
5967
|
+
const createGroupFromSerializedState = (data) => {
|
|
5968
|
+
const { id, locked, hideHeader, views, activeView } = data;
|
|
5969
|
+
if (typeof id !== 'string') {
|
|
5970
|
+
throw new Error('group id must be of type string');
|
|
5971
|
+
}
|
|
5972
|
+
const group = this.createGroup({
|
|
5973
|
+
id,
|
|
5974
|
+
locked: !!locked,
|
|
5975
|
+
hideHeader: !!hideHeader,
|
|
5924
5976
|
});
|
|
5977
|
+
const createdPanels = [];
|
|
5978
|
+
for (const child of views) {
|
|
5979
|
+
/**
|
|
5980
|
+
* Run the deserializer step seperately since this may fail to due corrupted external state.
|
|
5981
|
+
* In running this section first we avoid firing lots of 'add' events in the event of a failure
|
|
5982
|
+
* due to a corruption of input data.
|
|
5983
|
+
*/
|
|
5984
|
+
const panel = this._deserializer.fromJSON(panels[child], group);
|
|
5985
|
+
createdPanels.push(panel);
|
|
5986
|
+
}
|
|
5987
|
+
this._onDidAddGroup.fire(group);
|
|
5988
|
+
for (let i = 0; i < views.length; i++) {
|
|
5989
|
+
const panel = createdPanels[i];
|
|
5990
|
+
const isActive = typeof activeView === 'string' &&
|
|
5991
|
+
activeView === panel.id;
|
|
5992
|
+
group.model.openPanel(panel, {
|
|
5993
|
+
skipSetPanelActive: !isActive,
|
|
5994
|
+
skipSetGroupActive: true,
|
|
5995
|
+
});
|
|
5996
|
+
}
|
|
5997
|
+
if (!group.activePanel && group.panels.length > 0) {
|
|
5998
|
+
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
5999
|
+
skipSetGroupActive: true,
|
|
6000
|
+
});
|
|
6001
|
+
}
|
|
6002
|
+
return group;
|
|
6003
|
+
};
|
|
6004
|
+
this.gridview.deserialize(grid, {
|
|
6005
|
+
fromJSON: (node) => {
|
|
6006
|
+
return createGroupFromSerializedState(node.data);
|
|
6007
|
+
},
|
|
6008
|
+
});
|
|
6009
|
+
this.layout(width, height, true);
|
|
6010
|
+
const serializedFloatingGroups = (_a = data.floatingGroups) !== null && _a !== void 0 ? _a : [];
|
|
6011
|
+
for (const serializedFloatingGroup of serializedFloatingGroups) {
|
|
6012
|
+
const { data, position } = serializedFloatingGroup;
|
|
6013
|
+
const group = createGroupFromSerializedState(data);
|
|
6014
|
+
this.addFloatingGroup(group, {
|
|
6015
|
+
x: position.left,
|
|
6016
|
+
y: position.top,
|
|
6017
|
+
height: position.height,
|
|
6018
|
+
width: position.width,
|
|
6019
|
+
}, { skipRemoveGroup: true, inDragMode: false });
|
|
6020
|
+
}
|
|
6021
|
+
for (const floatingGroup of this.floatingGroups) {
|
|
6022
|
+
floatingGroup.overlay.setBounds();
|
|
6023
|
+
}
|
|
6024
|
+
if (typeof activeGroup === 'string') {
|
|
6025
|
+
const panel = this.getPanel(activeGroup);
|
|
6026
|
+
if (panel) {
|
|
6027
|
+
this.doSetGroupActive(panel);
|
|
6028
|
+
}
|
|
5925
6029
|
}
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
6030
|
+
}
|
|
6031
|
+
catch (err) {
|
|
6032
|
+
/**
|
|
6033
|
+
* Takes all the successfully created groups and remove all of their panels.
|
|
6034
|
+
*/
|
|
6035
|
+
for (const group of this.groups) {
|
|
6036
|
+
for (const panel of group.panels) {
|
|
6037
|
+
this.removePanel(panel, {
|
|
6038
|
+
removeEmptyGroup: false,
|
|
6039
|
+
skipDispose: false,
|
|
6040
|
+
});
|
|
6041
|
+
}
|
|
5930
6042
|
}
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
const
|
|
5942
|
-
|
|
5943
|
-
this.addFloatingGroup(group, {
|
|
5944
|
-
x: position.left,
|
|
5945
|
-
y: position.top,
|
|
5946
|
-
height: position.height,
|
|
5947
|
-
width: position.width,
|
|
5948
|
-
}, { skipRemoveGroup: true, inDragMode: false });
|
|
5949
|
-
}
|
|
5950
|
-
for (const floatingGroup of this.floatingGroups) {
|
|
5951
|
-
floatingGroup.overlay.setBounds();
|
|
5952
|
-
}
|
|
5953
|
-
if (typeof activeGroup === 'string') {
|
|
5954
|
-
const panel = this.getPanel(activeGroup);
|
|
5955
|
-
if (panel) {
|
|
5956
|
-
this.doSetGroupActive(panel);
|
|
6043
|
+
/**
|
|
6044
|
+
* To remove a group we cannot call this.removeGroup(...) since this makes assumptions about
|
|
6045
|
+
* the underlying HTMLElement existing in the Gridview.
|
|
6046
|
+
*/
|
|
6047
|
+
for (const group of this.groups) {
|
|
6048
|
+
group.dispose();
|
|
6049
|
+
this._groups.delete(group.id);
|
|
6050
|
+
this._onDidRemoveGroup.fire(group);
|
|
6051
|
+
}
|
|
6052
|
+
// iterate over a reassigned array since original array will be modified
|
|
6053
|
+
for (const floatingGroup of [...this.floatingGroups]) {
|
|
6054
|
+
floatingGroup.dispose();
|
|
5957
6055
|
}
|
|
6056
|
+
// fires clean-up events and clears the underlying HTML gridview.
|
|
6057
|
+
this.clear();
|
|
6058
|
+
/**
|
|
6059
|
+
* even though we have cleaned-up we still want to inform the caller of their error
|
|
6060
|
+
* and we'll do this through re-throwing the original error since afterall you would
|
|
6061
|
+
* expect trying to load a corrupted layout to result in an error and not silently fail...
|
|
6062
|
+
*/
|
|
6063
|
+
throw err;
|
|
5958
6064
|
}
|
|
5959
6065
|
this._onDidLayoutFromJSON.fire();
|
|
5960
6066
|
}
|
|
@@ -6168,6 +6274,7 @@
|
|
|
6168
6274
|
if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
|
|
6169
6275
|
floatingGroup.group.dispose();
|
|
6170
6276
|
this._groups.delete(group.id);
|
|
6277
|
+
// TODO: fire group removed event?
|
|
6171
6278
|
}
|
|
6172
6279
|
floatingGroup.dispose();
|
|
6173
6280
|
return floatingGroup.group;
|
|
@@ -6408,42 +6515,63 @@
|
|
|
6408
6515
|
fromJSON(serializedGridview) {
|
|
6409
6516
|
this.clear();
|
|
6410
6517
|
const { grid, activePanel } = serializedGridview;
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
.
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6518
|
+
try {
|
|
6519
|
+
const queue = [];
|
|
6520
|
+
// take note of the existing dimensions
|
|
6521
|
+
const width = this.width;
|
|
6522
|
+
const height = this.height;
|
|
6523
|
+
this.gridview.deserialize(grid, {
|
|
6524
|
+
fromJSON: (node) => {
|
|
6525
|
+
const { data } = node;
|
|
6526
|
+
const view = createComponent(data.id, data.component, this.options.components || {}, this.options.frameworkComponents || {}, this.options.frameworkComponentFactory
|
|
6527
|
+
? {
|
|
6528
|
+
createComponent: this.options.frameworkComponentFactory
|
|
6529
|
+
.createComponent,
|
|
6530
|
+
}
|
|
6531
|
+
: undefined);
|
|
6532
|
+
queue.push(() => view.init({
|
|
6533
|
+
params: data.params,
|
|
6534
|
+
minimumWidth: data.minimumWidth,
|
|
6535
|
+
maximumWidth: data.maximumWidth,
|
|
6536
|
+
minimumHeight: data.minimumHeight,
|
|
6537
|
+
maximumHeight: data.maximumHeight,
|
|
6538
|
+
priority: data.priority,
|
|
6539
|
+
snap: !!data.snap,
|
|
6540
|
+
accessor: this,
|
|
6541
|
+
isVisible: node.visible,
|
|
6542
|
+
}));
|
|
6543
|
+
this._onDidAddGroup.fire(view);
|
|
6544
|
+
this.registerPanel(view);
|
|
6545
|
+
return view;
|
|
6546
|
+
},
|
|
6547
|
+
});
|
|
6548
|
+
this.layout(width, height, true);
|
|
6549
|
+
queue.forEach((f) => f());
|
|
6550
|
+
if (typeof activePanel === 'string') {
|
|
6551
|
+
const panel = this.getPanel(activePanel);
|
|
6552
|
+
if (panel) {
|
|
6553
|
+
this.doSetGroupActive(panel);
|
|
6554
|
+
}
|
|
6555
|
+
}
|
|
6556
|
+
}
|
|
6557
|
+
catch (err) {
|
|
6558
|
+
/**
|
|
6559
|
+
* To remove a group we cannot call this.removeGroup(...) since this makes assumptions about
|
|
6560
|
+
* the underlying HTMLElement existing in the Gridview.
|
|
6561
|
+
*/
|
|
6562
|
+
for (const group of this.groups) {
|
|
6563
|
+
group.dispose();
|
|
6564
|
+
this._groups.delete(group.id);
|
|
6565
|
+
this._onDidRemoveGroup.fire(group);
|
|
6446
6566
|
}
|
|
6567
|
+
// fires clean-up events and clears the underlying HTML gridview.
|
|
6568
|
+
this.clear();
|
|
6569
|
+
/**
|
|
6570
|
+
* even though we have cleaned-up we still want to inform the caller of their error
|
|
6571
|
+
* and we'll do this through re-throwing the original error since afterall you would
|
|
6572
|
+
* expect trying to load a corrupted layout to result in an error and not silently fail...
|
|
6573
|
+
*/
|
|
6574
|
+
throw err;
|
|
6447
6575
|
}
|
|
6448
6576
|
this._onDidLayoutfromJSON.fire();
|
|
6449
6577
|
}
|