dockview-core 5.0.0 → 5.1.0

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.
@@ -135,6 +135,9 @@ var OverlayRenderContainer = /** @class */ (function (_super) {
135
135
  if (!this.map[panel.api.id]) {
136
136
  var element = createFocusableElement();
137
137
  element.className = 'dv-render-overlay';
138
+ // Hide until the first RAF-based position is applied to prevent a
139
+ // one-frame flash at position 0,0 when the element is first attached.
140
+ element.style.visibility = 'hidden';
138
141
  this.map[panel.api.id] = {
139
142
  panel: panel,
140
143
  disposable: lifecycle_1.Disposable.NONE,
@@ -171,6 +174,11 @@ var OverlayRenderContainer = /** @class */ (function (_super) {
171
174
  focusContainer.style.top = "".concat(top, "px");
172
175
  focusContainer.style.width = "".concat(width, "px");
173
176
  focusContainer.style.height = "".concat(height, "px");
177
+ // Reveal after the first position is applied (was hidden to
178
+ // prevent a flash at 0,0 before the initial layout fires).
179
+ if (focusContainer.style.visibility === 'hidden') {
180
+ focusContainer.style.visibility = '';
181
+ }
174
182
  (0, dom_1.toggleClass)(focusContainer, 'dv-render-overlay-float', panel.group.api.location.type === 'floating');
175
183
  });
176
184
  };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-core
3
- * @version 5.0.0
3
+ * @version 5.1.0
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -8133,6 +8133,9 @@
8133
8133
  if (!this.map[panel.api.id]) {
8134
8134
  const element = createFocusableElement();
8135
8135
  element.className = 'dv-render-overlay';
8136
+ // Hide until the first RAF-based position is applied to prevent a
8137
+ // one-frame flash at position 0,0 when the element is first attached.
8138
+ element.style.visibility = 'hidden';
8136
8139
  this.map[panel.api.id] = {
8137
8140
  panel,
8138
8141
  disposable: exports.DockviewDisposable.NONE,
@@ -8169,6 +8172,11 @@
8169
8172
  focusContainer.style.top = `${top}px`;
8170
8173
  focusContainer.style.width = `${width}px`;
8171
8174
  focusContainer.style.height = `${height}px`;
8175
+ // Reveal after the first position is applied (was hidden to
8176
+ // prevent a flash at 0,0 before the initial layout fires).
8177
+ if (focusContainer.style.visibility === 'hidden') {
8178
+ focusContainer.style.visibility = '';
8179
+ }
8172
8180
  toggleClass(focusContainer, 'dv-render-overlay-float', panel.group.api.location.type === 'floating');
8173
8181
  });
8174
8182
  };