dockview-angular 4.12.0 → 4.13.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/dockview-angular.amd.js +54 -21
- package/dist/dockview-angular.amd.js.map +1 -1
- package/dist/dockview-angular.amd.min.js +2 -2
- package/dist/dockview-angular.amd.min.js.map +1 -1
- package/dist/dockview-angular.amd.min.noStyle.js +2 -2
- package/dist/dockview-angular.amd.min.noStyle.js.map +1 -1
- package/dist/dockview-angular.amd.noStyle.js +54 -21
- package/dist/dockview-angular.amd.noStyle.js.map +1 -1
- package/dist/dockview-angular.cjs.js +54 -21
- package/dist/dockview-angular.cjs.js.map +1 -1
- package/dist/dockview-angular.esm.js +54 -22
- package/dist/dockview-angular.esm.js.map +1 -1
- package/dist/dockview-angular.esm.min.js +2 -2
- package/dist/dockview-angular.esm.min.js.map +1 -1
- package/dist/dockview-angular.js +54 -21
- package/dist/dockview-angular.js.map +1 -1
- package/dist/dockview-angular.min.js +2 -2
- package/dist/dockview-angular.min.js.map +1 -1
- package/dist/dockview-angular.min.noStyle.js +2 -2
- package/dist/dockview-angular.min.noStyle.js.map +1 -1
- package/dist/dockview-angular.noStyle.js +54 -21
- package/dist/dockview-angular.noStyle.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-angular
|
|
3
|
-
* @version 4.
|
|
3
|
+
* @version 4.13.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -1264,11 +1264,13 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
1264
1264
|
document.removeEventListener('pointermove', onPointerMove);
|
|
1265
1265
|
document.removeEventListener('pointerup', end);
|
|
1266
1266
|
document.removeEventListener('pointercancel', end);
|
|
1267
|
+
document.removeEventListener('contextmenu', end);
|
|
1267
1268
|
this._onDidSashEnd.fire(undefined);
|
|
1268
1269
|
};
|
|
1269
1270
|
document.addEventListener('pointermove', onPointerMove);
|
|
1270
1271
|
document.addEventListener('pointerup', end);
|
|
1271
1272
|
document.addEventListener('pointercancel', end);
|
|
1273
|
+
document.addEventListener('contextmenu', end);
|
|
1272
1274
|
};
|
|
1273
1275
|
sash.addEventListener('pointerdown', onPointerStart);
|
|
1274
1276
|
const sashItem = {
|
|
@@ -5130,7 +5132,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
5130
5132
|
}
|
|
5131
5133
|
}
|
|
5132
5134
|
|
|
5133
|
-
class
|
|
5135
|
+
class DockviewWillShowOverlayLocationEvent {
|
|
5134
5136
|
get kind() {
|
|
5135
5137
|
return this.options.kind;
|
|
5136
5138
|
}
|
|
@@ -5478,7 +5480,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
5478
5480
|
index: this._tabs.findIndex((x) => x.value === tab),
|
|
5479
5481
|
});
|
|
5480
5482
|
}), tab.onWillShowOverlay((event) => {
|
|
5481
|
-
this._onWillShowOverlay.fire(new
|
|
5483
|
+
this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
|
|
5482
5484
|
kind: 'tab',
|
|
5483
5485
|
panel: this.group.activePanel,
|
|
5484
5486
|
api: this.accessor.api,
|
|
@@ -5642,7 +5644,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
5642
5644
|
index: this.tabs.size,
|
|
5643
5645
|
});
|
|
5644
5646
|
}), this.voidContainer.onWillShowOverlay((event) => {
|
|
5645
|
-
this._onWillShowOverlay.fire(new
|
|
5647
|
+
this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
|
|
5646
5648
|
kind: 'header_space',
|
|
5647
5649
|
panel: this.group.activePanel,
|
|
5648
5650
|
api: this.accessor.api,
|
|
@@ -6036,7 +6038,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
6036
6038
|
}), this.tabsContainer.onWillShowOverlay((event) => {
|
|
6037
6039
|
this._onWillShowOverlay.fire(event);
|
|
6038
6040
|
}), this.contentContainer.dropTarget.onWillShowOverlay((event) => {
|
|
6039
|
-
this._onWillShowOverlay.fire(new
|
|
6041
|
+
this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
|
|
6040
6042
|
kind: 'content',
|
|
6041
6043
|
panel: this.activePanel,
|
|
6042
6044
|
api: this._api,
|
|
@@ -6712,7 +6714,19 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
6712
6714
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
6713
6715
|
this._onDidActivePanelChange = new Emitter();
|
|
6714
6716
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
6715
|
-
this.addDisposables(this._onDidLocationChange, this._onDidActivePanelChange)
|
|
6717
|
+
this.addDisposables(this._onDidLocationChange, this._onDidActivePanelChange, this._onDidVisibilityChange.event((event) => {
|
|
6718
|
+
// When becoming visible, apply any pending size change
|
|
6719
|
+
if (event.isVisible && this._pendingSize) {
|
|
6720
|
+
super.setSize(this._pendingSize);
|
|
6721
|
+
this._pendingSize = undefined;
|
|
6722
|
+
}
|
|
6723
|
+
}));
|
|
6724
|
+
}
|
|
6725
|
+
setSize(event) {
|
|
6726
|
+
// Always store the requested size
|
|
6727
|
+
this._pendingSize = Object.assign({}, event);
|
|
6728
|
+
// Apply the size change immediately
|
|
6729
|
+
super.setSize(event);
|
|
6716
6730
|
}
|
|
6717
6731
|
close() {
|
|
6718
6732
|
if (!this._group) {
|
|
@@ -7664,13 +7678,16 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
7664
7678
|
let right = undefined;
|
|
7665
7679
|
let width = undefined;
|
|
7666
7680
|
const moveTop = () => {
|
|
7667
|
-
|
|
7681
|
+
// When dragging top handle, constrain top position to prevent oversizing
|
|
7682
|
+
const maxTop = startPosition.originalY +
|
|
7668
7683
|
startPosition.originalHeight >
|
|
7669
7684
|
containerRect.height
|
|
7670
|
-
?
|
|
7685
|
+
? Math.max(0, containerRect.height -
|
|
7686
|
+
Overlay.MINIMUM_HEIGHT)
|
|
7671
7687
|
: Math.max(0, startPosition.originalY +
|
|
7672
7688
|
startPosition.originalHeight -
|
|
7673
|
-
Overlay.MINIMUM_HEIGHT)
|
|
7689
|
+
Overlay.MINIMUM_HEIGHT);
|
|
7690
|
+
top = clamp(y, 0, maxTop);
|
|
7674
7691
|
height =
|
|
7675
7692
|
startPosition.originalY +
|
|
7676
7693
|
startPosition.originalHeight -
|
|
@@ -7681,22 +7698,27 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
7681
7698
|
top =
|
|
7682
7699
|
startPosition.originalY -
|
|
7683
7700
|
startPosition.originalHeight;
|
|
7684
|
-
|
|
7685
|
-
|
|
7686
|
-
|
|
7701
|
+
// When dragging bottom handle, constrain height to container height
|
|
7702
|
+
const minHeight = top < 0 &&
|
|
7703
|
+
typeof this.options.minimumInViewportHeight ===
|
|
7704
|
+
'number'
|
|
7687
7705
|
? -top +
|
|
7688
7706
|
this.options.minimumInViewportHeight
|
|
7689
|
-
: Overlay.MINIMUM_HEIGHT
|
|
7707
|
+
: Overlay.MINIMUM_HEIGHT;
|
|
7708
|
+
const maxHeight = containerRect.height - Math.max(0, top);
|
|
7709
|
+
height = clamp(y - top, minHeight, maxHeight);
|
|
7690
7710
|
bottom = containerRect.height - top - height;
|
|
7691
7711
|
};
|
|
7692
7712
|
const moveLeft = () => {
|
|
7693
|
-
|
|
7713
|
+
const maxLeft = startPosition.originalX +
|
|
7694
7714
|
startPosition.originalWidth >
|
|
7695
7715
|
containerRect.width
|
|
7696
|
-
?
|
|
7716
|
+
? Math.max(0, containerRect.width -
|
|
7717
|
+
Overlay.MINIMUM_WIDTH) // Prevent extending beyong right edge
|
|
7697
7718
|
: Math.max(0, startPosition.originalX +
|
|
7698
7719
|
startPosition.originalWidth -
|
|
7699
|
-
Overlay.MINIMUM_WIDTH)
|
|
7720
|
+
Overlay.MINIMUM_WIDTH);
|
|
7721
|
+
left = clamp(x, 0, maxLeft); // min is 0 (Not -Infinity) to prevent dragging beyond left edge
|
|
7700
7722
|
width =
|
|
7701
7723
|
startPosition.originalX +
|
|
7702
7724
|
startPosition.originalWidth -
|
|
@@ -7707,12 +7729,15 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
7707
7729
|
left =
|
|
7708
7730
|
startPosition.originalX -
|
|
7709
7731
|
startPosition.originalWidth;
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7732
|
+
// When dragging right handle, constrain width to container width
|
|
7733
|
+
const minWidth = left < 0 &&
|
|
7734
|
+
typeof this.options.minimumInViewportWidth ===
|
|
7735
|
+
'number'
|
|
7713
7736
|
? -left +
|
|
7714
7737
|
this.options.minimumInViewportWidth
|
|
7715
|
-
: Overlay.MINIMUM_WIDTH
|
|
7738
|
+
: Overlay.MINIMUM_WIDTH;
|
|
7739
|
+
const maxWidth = containerRect.width - Math.max(0, left);
|
|
7740
|
+
width = clamp(x - left, minWidth, maxWidth);
|
|
7716
7741
|
right = containerRect.width - left - width;
|
|
7717
7742
|
};
|
|
7718
7743
|
switch (direction) {
|
|
@@ -8542,7 +8567,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
8542
8567
|
// option only available when no panels in primary grid
|
|
8543
8568
|
return;
|
|
8544
8569
|
}
|
|
8545
|
-
this._onWillShowOverlay.fire(new
|
|
8570
|
+
this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
|
|
8546
8571
|
kind: 'edge',
|
|
8547
8572
|
panel: undefined,
|
|
8548
8573
|
api: this._api,
|
|
@@ -9779,6 +9804,13 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9779
9804
|
panel: removedPanel,
|
|
9780
9805
|
from: sourceGroup,
|
|
9781
9806
|
});
|
|
9807
|
+
/**
|
|
9808
|
+
* Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
|
|
9809
|
+
* With defaultRenderer="always" this results in panel content not showing after move operations.
|
|
9810
|
+
*/
|
|
9811
|
+
requestAnimationFrame(() => {
|
|
9812
|
+
this.overlayRenderContainer.updateAllPositions();
|
|
9813
|
+
});
|
|
9782
9814
|
}
|
|
9783
9815
|
else {
|
|
9784
9816
|
/**
|
|
@@ -13082,6 +13114,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
13082
13114
|
exports.DockviewPanel = DockviewPanel;
|
|
13083
13115
|
exports.DockviewUnhandledDragOverEvent = DockviewUnhandledDragOverEvent;
|
|
13084
13116
|
exports.DockviewWillDropEvent = DockviewWillDropEvent;
|
|
13117
|
+
exports.DockviewWillShowOverlayLocationEvent = DockviewWillShowOverlayLocationEvent;
|
|
13085
13118
|
exports.DraggablePaneviewPanel = DraggablePaneviewPanel;
|
|
13086
13119
|
exports.Gridview = Gridview;
|
|
13087
13120
|
exports.GridviewApi = GridviewApi;
|