dockview-core 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-core
3
- * @version 4.13.0
3
+ * @version 4.13.1
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -8581,7 +8581,14 @@ class DockviewComponent extends BaseGrid {
8581
8581
  if (options.debug) {
8582
8582
  this.addDisposables(new StrictEventsSequencing(this));
8583
8583
  }
8584
- 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(() => {
8584
+ 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(() => {
8585
+ /**
8586
+ * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
8587
+ * With defaultRenderer="always" this results in panel content not showing after move operations.
8588
+ * Debounced to avoid multiple calls when moving groups with multiple panels.
8589
+ */
8590
+ this.debouncedUpdateAllPositions();
8591
+ }), this._onDidAddGroup, this._onDidRemoveGroup, this._onDidActiveGroupChange, this._onUnhandledDragOverEvent, this._onDidMaximizedGroupChange, this._onDidOptionsChange, this._onDidPopoutGroupSizeChange, this._onDidPopoutGroupPositionChange, this._onDidOpenPopoutWindowFail, this.onDidViewVisibilityChangeMicroTaskQueue(() => {
8585
8592
  this.updateWatermark();
8586
8593
  }), this.onDidAdd((event) => {
8587
8594
  if (!this._moving) {
@@ -9447,9 +9454,7 @@ class DockviewComponent extends BaseGrid {
9447
9454
  }
9448
9455
  this.updateWatermark();
9449
9456
  // Force position updates for always visible panels after DOM layout is complete
9450
- requestAnimationFrame(() => {
9451
- this.overlayRenderContainer.updateAllPositions();
9452
- });
9457
+ this.debouncedUpdateAllPositions();
9453
9458
  this._onDidLayoutFromJSON.fire();
9454
9459
  }
9455
9460
  clear() {
@@ -9785,6 +9790,15 @@ class DockviewComponent extends BaseGrid {
9785
9790
  }
9786
9791
  return re;
9787
9792
  }
9793
+ debouncedUpdateAllPositions() {
9794
+ if (this._updatePositionsFrameId !== undefined) {
9795
+ cancelAnimationFrame(this._updatePositionsFrameId);
9796
+ }
9797
+ this._updatePositionsFrameId = requestAnimationFrame(() => {
9798
+ this._updatePositionsFrameId = undefined;
9799
+ this.overlayRenderContainer.updateAllPositions();
9800
+ });
9801
+ }
9788
9802
  movingLock(func) {
9789
9803
  const isMoving = this._moving;
9790
9804
  try {
@@ -9855,13 +9869,6 @@ class DockviewComponent extends BaseGrid {
9855
9869
  panel: removedPanel,
9856
9870
  from: sourceGroup,
9857
9871
  });
9858
- /**
9859
- * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
9860
- * With defaultRenderer="always" this results in panel content not showing after move operations.
9861
- */
9862
- requestAnimationFrame(() => {
9863
- this.overlayRenderContainer.updateAllPositions();
9864
- });
9865
9872
  }
9866
9873
  else {
9867
9874
  /**
@@ -10102,6 +10109,7 @@ class DockviewComponent extends BaseGrid {
10102
10109
  from.panels.forEach((panel) => {
10103
10110
  this._onDidMovePanel.fire({ panel, from });
10104
10111
  });
10112
+ this.debouncedUpdateAllPositions();
10105
10113
  // Ensure group becomes active after move
10106
10114
  if (options.skipSetActive === false) {
10107
10115
  // Only activate when explicitly requested (skipSetActive: false)