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