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
  */
@@ -8557,7 +8557,14 @@
8557
8557
  if (options.debug) {
8558
8558
  this.addDisposables(new StrictEventsSequencing(this));
8559
8559
  }
8560
- 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(() => {
8560
+ 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(() => {
8561
+ /**
8562
+ * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
8563
+ * With defaultRenderer="always" this results in panel content not showing after move operations.
8564
+ * Debounced to avoid multiple calls when moving groups with multiple panels.
8565
+ */
8566
+ this.debouncedUpdateAllPositions();
8567
+ }), this._onDidAddGroup, this._onDidRemoveGroup, this._onDidActiveGroupChange, this._onUnhandledDragOverEvent, this._onDidMaximizedGroupChange, this._onDidOptionsChange, this._onDidPopoutGroupSizeChange, this._onDidPopoutGroupPositionChange, this._onDidOpenPopoutWindowFail, this.onDidViewVisibilityChangeMicroTaskQueue(() => {
8561
8568
  this.updateWatermark();
8562
8569
  }), this.onDidAdd((event) => {
8563
8570
  if (!this._moving) {
@@ -9423,9 +9430,7 @@
9423
9430
  }
9424
9431
  this.updateWatermark();
9425
9432
  // Force position updates for always visible panels after DOM layout is complete
9426
- requestAnimationFrame(() => {
9427
- this.overlayRenderContainer.updateAllPositions();
9428
- });
9433
+ this.debouncedUpdateAllPositions();
9429
9434
  this._onDidLayoutFromJSON.fire();
9430
9435
  }
9431
9436
  clear() {
@@ -9761,6 +9766,15 @@
9761
9766
  }
9762
9767
  return re;
9763
9768
  }
9769
+ debouncedUpdateAllPositions() {
9770
+ if (this._updatePositionsFrameId !== undefined) {
9771
+ cancelAnimationFrame(this._updatePositionsFrameId);
9772
+ }
9773
+ this._updatePositionsFrameId = requestAnimationFrame(() => {
9774
+ this._updatePositionsFrameId = undefined;
9775
+ this.overlayRenderContainer.updateAllPositions();
9776
+ });
9777
+ }
9764
9778
  movingLock(func) {
9765
9779
  const isMoving = this._moving;
9766
9780
  try {
@@ -9831,13 +9845,6 @@
9831
9845
  panel: removedPanel,
9832
9846
  from: sourceGroup,
9833
9847
  });
9834
- /**
9835
- * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
9836
- * With defaultRenderer="always" this results in panel content not showing after move operations.
9837
- */
9838
- requestAnimationFrame(() => {
9839
- this.overlayRenderContainer.updateAllPositions();
9840
- });
9841
9848
  }
9842
9849
  else {
9843
9850
  /**
@@ -10078,6 +10085,7 @@
10078
10085
  from.panels.forEach((panel) => {
10079
10086
  this._onDidMovePanel.fire({ panel, from });
10080
10087
  });
10088
+ this.debouncedUpdateAllPositions();
10081
10089
  // Ensure group becomes active after move
10082
10090
  if (options.skipSetActive === false) {
10083
10091
  // Only activate when explicitly requested (skipSetActive: false)