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