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.
@@ -292,6 +292,8 @@ export declare class DockviewComponent extends BaseGrid<DockviewGroupPanel> impl
292
292
  skipPopoutReturn?: boolean;
293
293
  } | undefined): DockviewGroupPanel;
294
294
  private _moving;
295
+ private _updatePositionsFrameId;
296
+ private debouncedUpdateAllPositions;
295
297
  movingLock<T>(func: () => T): T;
296
298
  moveGroupOrPanel(options: MoveGroupOrPanelOptions): void;
297
299
  moveGroup(options: MoveGroupOptions): void;
@@ -184,7 +184,14 @@ export class DockviewComponent extends BaseGrid {
184
184
  if (options.debug) {
185
185
  this.addDisposables(new StrictEventsSequencing(this));
186
186
  }
187
- 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(() => {
187
+ 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(() => {
188
+ /**
189
+ * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
190
+ * With defaultRenderer="always" this results in panel content not showing after move operations.
191
+ * Debounced to avoid multiple calls when moving groups with multiple panels.
192
+ */
193
+ this.debouncedUpdateAllPositions();
194
+ }), this._onDidAddGroup, this._onDidRemoveGroup, this._onDidActiveGroupChange, this._onUnhandledDragOverEvent, this._onDidMaximizedGroupChange, this._onDidOptionsChange, this._onDidPopoutGroupSizeChange, this._onDidPopoutGroupPositionChange, this._onDidOpenPopoutWindowFail, this.onDidViewVisibilityChangeMicroTaskQueue(() => {
188
195
  this.updateWatermark();
189
196
  }), this.onDidAdd((event) => {
190
197
  if (!this._moving) {
@@ -1052,9 +1059,7 @@ export class DockviewComponent extends BaseGrid {
1052
1059
  }
1053
1060
  this.updateWatermark();
1054
1061
  // Force position updates for always visible panels after DOM layout is complete
1055
- requestAnimationFrame(() => {
1056
- this.overlayRenderContainer.updateAllPositions();
1057
- });
1062
+ this.debouncedUpdateAllPositions();
1058
1063
  this._onDidLayoutFromJSON.fire();
1059
1064
  }
1060
1065
  clear() {
@@ -1390,6 +1395,15 @@ export class DockviewComponent extends BaseGrid {
1390
1395
  }
1391
1396
  return re;
1392
1397
  }
1398
+ debouncedUpdateAllPositions() {
1399
+ if (this._updatePositionsFrameId !== undefined) {
1400
+ cancelAnimationFrame(this._updatePositionsFrameId);
1401
+ }
1402
+ this._updatePositionsFrameId = requestAnimationFrame(() => {
1403
+ this._updatePositionsFrameId = undefined;
1404
+ this.overlayRenderContainer.updateAllPositions();
1405
+ });
1406
+ }
1393
1407
  movingLock(func) {
1394
1408
  const isMoving = this._moving;
1395
1409
  try {
@@ -1460,13 +1474,6 @@ export class DockviewComponent extends BaseGrid {
1460
1474
  panel: removedPanel,
1461
1475
  from: sourceGroup,
1462
1476
  });
1463
- /**
1464
- * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
1465
- * With defaultRenderer="always" this results in panel content not showing after move operations.
1466
- */
1467
- requestAnimationFrame(() => {
1468
- this.overlayRenderContainer.updateAllPositions();
1469
- });
1470
1477
  }
1471
1478
  else {
1472
1479
  /**
@@ -1707,6 +1714,7 @@ export class DockviewComponent extends BaseGrid {
1707
1714
  from.panels.forEach((panel) => {
1708
1715
  this._onDidMovePanel.fire({ panel, from });
1709
1716
  });
1717
+ this.debouncedUpdateAllPositions();
1710
1718
  // Ensure group becomes active after move
1711
1719
  if (options.skipSetActive === false) {
1712
1720
  // Only activate when explicitly requested (skipSetActive: false)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dockview-core",
3
- "version": "4.13.0",
3
+ "version": "4.13.1",
4
4
  "description": "Zero dependency layout manager supporting tabs, grids and splitviews",
5
5
  "keywords": [
6
6
  "splitview",