dockview-core 1.15.0 → 1.15.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/api/component.api.d.ts +1 -0
- package/dist/cjs/api/component.api.js +7 -0
- package/dist/cjs/dockview/dockviewComponent.d.ts +7 -3
- package/dist/cjs/dockview/dockviewComponent.js +18 -8
- package/dist/cjs/dockview/options.d.ts +2 -2
- package/dist/cjs/gridview/baseComponentGridview.js +1 -1
- package/dist/cjs/types.d.ts +1 -1
- package/dist/dockview-core.amd.js +19 -10
- 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 +19 -10
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +19 -10
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +19 -10
- 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 +19 -10
- 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 +19 -10
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/api/component.api.d.ts +1 -0
- package/dist/esm/api/component.api.js +3 -0
- package/dist/esm/dockview/dockviewComponent.d.ts +7 -3
- package/dist/esm/dockview/dockviewComponent.js +14 -8
- package/dist/esm/dockview/options.d.ts +2 -2
- package/dist/esm/gridview/baseComponentGridview.js +1 -1
- package/dist/esm/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 1.15.
|
|
3
|
+
* @version 1.15.2
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -2796,7 +2796,7 @@ class BaseGrid extends Resizable {
|
|
|
2796
2796
|
this.doSetGroupActive(next);
|
|
2797
2797
|
}
|
|
2798
2798
|
layout(width, height, forceResize) {
|
|
2799
|
-
const different = forceResize
|
|
2799
|
+
const different = forceResize || width !== this.width || height !== this.height;
|
|
2800
2800
|
if (!different) {
|
|
2801
2801
|
return;
|
|
2802
2802
|
}
|
|
@@ -3269,6 +3269,9 @@ class DockviewApi {
|
|
|
3269
3269
|
get totalPanels() {
|
|
3270
3270
|
return this.component.totalPanels;
|
|
3271
3271
|
}
|
|
3272
|
+
get gap() {
|
|
3273
|
+
return this.component.gap;
|
|
3274
|
+
}
|
|
3272
3275
|
/**
|
|
3273
3276
|
* Invoked when the active group changes. May be undefined if no group is active.
|
|
3274
3277
|
*/
|
|
@@ -7221,6 +7224,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
7221
7224
|
get api() {
|
|
7222
7225
|
return this._api;
|
|
7223
7226
|
}
|
|
7227
|
+
get gap() {
|
|
7228
|
+
return this.gridview.margin;
|
|
7229
|
+
}
|
|
7224
7230
|
constructor(options) {
|
|
7225
7231
|
var _a;
|
|
7226
7232
|
super({
|
|
@@ -7390,7 +7396,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
7390
7396
|
var _a, _b, _c;
|
|
7391
7397
|
if (itemToPopout instanceof DockviewPanel &&
|
|
7392
7398
|
itemToPopout.group.size === 1) {
|
|
7393
|
-
return this.addPopoutGroup(itemToPopout.group);
|
|
7399
|
+
return this.addPopoutGroup(itemToPopout.group, options);
|
|
7394
7400
|
}
|
|
7395
7401
|
const theme = getDockviewTheme(this.gridview.element);
|
|
7396
7402
|
const element = this.element;
|
|
@@ -7608,14 +7614,14 @@ class DockviewComponent extends BaseGrid {
|
|
|
7608
7614
|
else {
|
|
7609
7615
|
result.top = DEFAULT_FLOATING_GROUP_POSITION.top;
|
|
7610
7616
|
}
|
|
7611
|
-
if (
|
|
7612
|
-
result.width = Math.max(options.
|
|
7617
|
+
if (typeof options.width === 'number') {
|
|
7618
|
+
result.width = Math.max(options.width, 0);
|
|
7613
7619
|
}
|
|
7614
7620
|
else {
|
|
7615
7621
|
result.width = DEFAULT_FLOATING_GROUP_POSITION.width;
|
|
7616
7622
|
}
|
|
7617
|
-
if (
|
|
7618
|
-
result.height = Math.max(options.
|
|
7623
|
+
if (typeof options.height === 'number') {
|
|
7624
|
+
result.height = Math.max(options.height, 0);
|
|
7619
7625
|
}
|
|
7620
7626
|
else {
|
|
7621
7627
|
result.height = DEFAULT_FLOATING_GROUP_POSITION.height;
|
|
@@ -7746,7 +7752,10 @@ class DockviewComponent extends BaseGrid {
|
|
|
7746
7752
|
if (changed_rootOverlayOptions) {
|
|
7747
7753
|
this._rootDropTarget.setOverlayModel(options.rootOverlayModel);
|
|
7748
7754
|
}
|
|
7749
|
-
if (
|
|
7755
|
+
if (
|
|
7756
|
+
// if explicitly set as `undefined`
|
|
7757
|
+
'gap' in options &&
|
|
7758
|
+
options.gap === undefined) {
|
|
7750
7759
|
this.gridview.margin = 0;
|
|
7751
7760
|
}
|
|
7752
7761
|
if (typeof options.gap === 'number') {
|
|
@@ -8047,11 +8056,11 @@ class DockviewComponent extends BaseGrid {
|
|
|
8047
8056
|
if (options.floating) {
|
|
8048
8057
|
const group = this.createGroup();
|
|
8049
8058
|
this._onDidAddGroup.fire(group);
|
|
8050
|
-
const
|
|
8059
|
+
const floatingGroupOptions = typeof options.floating === 'object' &&
|
|
8051
8060
|
options.floating !== null
|
|
8052
8061
|
? options.floating
|
|
8053
8062
|
: {};
|
|
8054
|
-
this.addFloatingGroup(group, Object.assign(Object.assign({},
|
|
8063
|
+
this.addFloatingGroup(group, Object.assign(Object.assign({}, floatingGroupOptions), { inDragMode: false, skipRemoveGroup: true, skipActiveGroup: true }));
|
|
8055
8064
|
panel = this.createPanel(options, group);
|
|
8056
8065
|
group.model.openPanel(panel, {
|
|
8057
8066
|
skipSetActive: options.inactive,
|