dockview-angular 4.13.0 → 4.13.1

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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-angular
3
- * @version 4.13.0
3
+ * @version 4.13.1
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -8562,7 +8562,14 @@ class DockviewComponent extends BaseGrid {
8562
8562
  if (options.debug) {
8563
8563
  this.addDisposables(new StrictEventsSequencing(this));
8564
8564
  }
8565
- this.addDisposables(this.rootDropTargetContainer, 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._onDidOptionsChange, this._onDidPopoutGroupSizeChange, this._onDidPopoutGroupPositionChange, this._onDidOpenPopoutWindowFail, this.onDidViewVisibilityChangeMicroTaskQueue(() => {
8565
+ this.addDisposables(this.rootDropTargetContainer, this.overlayRenderContainer, this._onWillDragPanel, this._onWillDragGroup, this._onWillShowOverlay, this._onDidActivePanelChange, this._onDidAddPanel, this._onDidRemovePanel, this._onDidLayoutFromJSON, this._onDidDrop, this._onWillDrop, this._onDidMovePanel, this._onDidMovePanel.event(() => {
8566
+ /**
8567
+ * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
8568
+ * With defaultRenderer="always" this results in panel content not showing after move operations.
8569
+ * Debounced to avoid multiple calls when moving groups with multiple panels.
8570
+ */
8571
+ this.debouncedUpdateAllPositions();
8572
+ }), this._onDidAddGroup, this._onDidRemoveGroup, this._onDidActiveGroupChange, this._onUnhandledDragOverEvent, this._onDidMaximizedGroupChange, this._onDidOptionsChange, this._onDidPopoutGroupSizeChange, this._onDidPopoutGroupPositionChange, this._onDidOpenPopoutWindowFail, this.onDidViewVisibilityChangeMicroTaskQueue(() => {
8566
8573
  this.updateWatermark();
8567
8574
  }), this.onDidAdd((event) => {
8568
8575
  if (!this._moving) {
@@ -9428,9 +9435,7 @@ class DockviewComponent extends BaseGrid {
9428
9435
  }
9429
9436
  this.updateWatermark();
9430
9437
  // Force position updates for always visible panels after DOM layout is complete
9431
- requestAnimationFrame(() => {
9432
- this.overlayRenderContainer.updateAllPositions();
9433
- });
9438
+ this.debouncedUpdateAllPositions();
9434
9439
  this._onDidLayoutFromJSON.fire();
9435
9440
  }
9436
9441
  clear() {
@@ -9766,6 +9771,15 @@ class DockviewComponent extends BaseGrid {
9766
9771
  }
9767
9772
  return re;
9768
9773
  }
9774
+ debouncedUpdateAllPositions() {
9775
+ if (this._updatePositionsFrameId !== undefined) {
9776
+ cancelAnimationFrame(this._updatePositionsFrameId);
9777
+ }
9778
+ this._updatePositionsFrameId = requestAnimationFrame(() => {
9779
+ this._updatePositionsFrameId = undefined;
9780
+ this.overlayRenderContainer.updateAllPositions();
9781
+ });
9782
+ }
9769
9783
  movingLock(func) {
9770
9784
  const isMoving = this._moving;
9771
9785
  try {
@@ -9836,13 +9850,6 @@ class DockviewComponent extends BaseGrid {
9836
9850
  panel: removedPanel,
9837
9851
  from: sourceGroup,
9838
9852
  });
9839
- /**
9840
- * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
9841
- * With defaultRenderer="always" this results in panel content not showing after move operations.
9842
- */
9843
- requestAnimationFrame(() => {
9844
- this.overlayRenderContainer.updateAllPositions();
9845
- });
9846
9853
  }
9847
9854
  else {
9848
9855
  /**
@@ -10083,6 +10090,7 @@ class DockviewComponent extends BaseGrid {
10083
10090
  from.panels.forEach((panel) => {
10084
10091
  this._onDidMovePanel.fire({ panel, from });
10085
10092
  });
10093
+ this.debouncedUpdateAllPositions();
10086
10094
  // Ensure group becomes active after move
10087
10095
  if (options.skipSetActive === false) {
10088
10096
  // Only activate when explicitly requested (skipSetActive: false)