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;
@@ -214,7 +214,14 @@ var DockviewComponent = /** @class */ (function (_super) {
214
214
  if (options.debug) {
215
215
  _this.addDisposables(new strictEventsSequencing_1.StrictEventsSequencing(_this));
216
216
  }
217
- _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(function () {
217
+ _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(function () {
218
+ /**
219
+ * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
220
+ * With defaultRenderer="always" this results in panel content not showing after move operations.
221
+ * Debounced to avoid multiple calls when moving groups with multiple panels.
222
+ */
223
+ _this.debouncedUpdateAllPositions();
224
+ }), _this._onDidAddGroup, _this._onDidRemoveGroup, _this._onDidActiveGroupChange, _this._onUnhandledDragOverEvent, _this._onDidMaximizedGroupChange, _this._onDidOptionsChange, _this._onDidPopoutGroupSizeChange, _this._onDidPopoutGroupPositionChange, _this._onDidOpenPopoutWindowFail, _this.onDidViewVisibilityChangeMicroTaskQueue(function () {
218
225
  _this.updateWatermark();
219
226
  }), _this.onDidAdd(function (event) {
220
227
  if (!_this._moving) {
@@ -1316,9 +1323,7 @@ var DockviewComponent = /** @class */ (function (_super) {
1316
1323
  }
1317
1324
  this.updateWatermark();
1318
1325
  // Force position updates for always visible panels after DOM layout is complete
1319
- requestAnimationFrame(function () {
1320
- _this.overlayRenderContainer.updateAllPositions();
1321
- });
1326
+ this.debouncedUpdateAllPositions();
1322
1327
  this._onDidLayoutFromJSON.fire();
1323
1328
  };
1324
1329
  DockviewComponent.prototype.clear = function () {
@@ -1688,6 +1693,16 @@ var DockviewComponent = /** @class */ (function (_super) {
1688
1693
  }
1689
1694
  return re;
1690
1695
  };
1696
+ DockviewComponent.prototype.debouncedUpdateAllPositions = function () {
1697
+ var _this = this;
1698
+ if (this._updatePositionsFrameId !== undefined) {
1699
+ cancelAnimationFrame(this._updatePositionsFrameId);
1700
+ }
1701
+ this._updatePositionsFrameId = requestAnimationFrame(function () {
1702
+ _this._updatePositionsFrameId = undefined;
1703
+ _this.overlayRenderContainer.updateAllPositions();
1704
+ });
1705
+ };
1691
1706
  DockviewComponent.prototype.movingLock = function (func) {
1692
1707
  var isMoving = this._moving;
1693
1708
  try {
@@ -1761,13 +1776,6 @@ var DockviewComponent = /** @class */ (function (_super) {
1761
1776
  panel: removedPanel_1,
1762
1777
  from: sourceGroup,
1763
1778
  });
1764
- /**
1765
- * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
1766
- * With defaultRenderer="always" this results in panel content not showing after move operations.
1767
- */
1768
- requestAnimationFrame(function () {
1769
- _this.overlayRenderContainer.updateAllPositions();
1770
- });
1771
1779
  }
1772
1780
  else {
1773
1781
  /**
@@ -2034,6 +2042,7 @@ var DockviewComponent = /** @class */ (function (_super) {
2034
2042
  from.panels.forEach(function (panel) {
2035
2043
  _this._onDidMovePanel.fire({ panel: panel, from: from });
2036
2044
  });
2045
+ this.debouncedUpdateAllPositions();
2037
2046
  // Ensure group becomes active after move
2038
2047
  if (options.skipSetActive === false) {
2039
2048
  // Only activate when explicitly requested (skipSetActive: false)
@@ -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 @@ define(['exports'], (function (exports) { 'use strict';
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 @@ define(['exports'], (function (exports) { 'use strict';
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 @@ define(['exports'], (function (exports) { 'use strict';
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 @@ define(['exports'], (function (exports) { 'use strict';
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 @@ define(['exports'], (function (exports) { 'use strict';
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)