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
  */
@@ -8553,7 +8553,14 @@ define(['exports'], (function (exports) { 'use strict';
8553
8553
  if (options.debug) {
8554
8554
  this.addDisposables(new StrictEventsSequencing(this));
8555
8555
  }
8556
- 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(() => {
8556
+ 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(() => {
8557
+ /**
8558
+ * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
8559
+ * With defaultRenderer="always" this results in panel content not showing after move operations.
8560
+ * Debounced to avoid multiple calls when moving groups with multiple panels.
8561
+ */
8562
+ this.debouncedUpdateAllPositions();
8563
+ }), this._onDidAddGroup, this._onDidRemoveGroup, this._onDidActiveGroupChange, this._onUnhandledDragOverEvent, this._onDidMaximizedGroupChange, this._onDidOptionsChange, this._onDidPopoutGroupSizeChange, this._onDidPopoutGroupPositionChange, this._onDidOpenPopoutWindowFail, this.onDidViewVisibilityChangeMicroTaskQueue(() => {
8557
8564
  this.updateWatermark();
8558
8565
  }), this.onDidAdd((event) => {
8559
8566
  if (!this._moving) {
@@ -9419,9 +9426,7 @@ define(['exports'], (function (exports) { 'use strict';
9419
9426
  }
9420
9427
  this.updateWatermark();
9421
9428
  // Force position updates for always visible panels after DOM layout is complete
9422
- requestAnimationFrame(() => {
9423
- this.overlayRenderContainer.updateAllPositions();
9424
- });
9429
+ this.debouncedUpdateAllPositions();
9425
9430
  this._onDidLayoutFromJSON.fire();
9426
9431
  }
9427
9432
  clear() {
@@ -9757,6 +9762,15 @@ define(['exports'], (function (exports) { 'use strict';
9757
9762
  }
9758
9763
  return re;
9759
9764
  }
9765
+ debouncedUpdateAllPositions() {
9766
+ if (this._updatePositionsFrameId !== undefined) {
9767
+ cancelAnimationFrame(this._updatePositionsFrameId);
9768
+ }
9769
+ this._updatePositionsFrameId = requestAnimationFrame(() => {
9770
+ this._updatePositionsFrameId = undefined;
9771
+ this.overlayRenderContainer.updateAllPositions();
9772
+ });
9773
+ }
9760
9774
  movingLock(func) {
9761
9775
  const isMoving = this._moving;
9762
9776
  try {
@@ -9827,13 +9841,6 @@ define(['exports'], (function (exports) { 'use strict';
9827
9841
  panel: removedPanel,
9828
9842
  from: sourceGroup,
9829
9843
  });
9830
- /**
9831
- * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
9832
- * With defaultRenderer="always" this results in panel content not showing after move operations.
9833
- */
9834
- requestAnimationFrame(() => {
9835
- this.overlayRenderContainer.updateAllPositions();
9836
- });
9837
9844
  }
9838
9845
  else {
9839
9846
  /**
@@ -10074,6 +10081,7 @@ define(['exports'], (function (exports) { 'use strict';
10074
10081
  from.panels.forEach((panel) => {
10075
10082
  this._onDidMovePanel.fire({ panel, from });
10076
10083
  });
10084
+ this.debouncedUpdateAllPositions();
10077
10085
  // Ensure group becomes active after move
10078
10086
  if (options.skipSetActive === false) {
10079
10087
  // Only activate when explicitly requested (skipSetActive: false)