dockview-core 8.4.1 → 8.5.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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-core
3
- * @version 8.4.1
3
+ * @version 8.5.0
4
4
  * @link https://github.com/dockview/dockview
5
5
  * @license MIT
6
6
  */
@@ -6084,24 +6084,25 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
6084
6084
  else this._element.removeAttribute("aria-labelledby");
6085
6085
  }
6086
6086
  renderPanel(panel, options) {
6087
- var _options$asActive, _this$panel;
6088
- const doRender = ((_options$asActive = options === null || options === void 0 ? void 0 : options.asActive) !== null && _options$asActive !== void 0 ? _options$asActive : true) || this.panel && this.group.isPanelActive(this.panel);
6089
- if (((_this$panel = this.panel) === null || _this$panel === void 0 ? void 0 : _this$panel.view.content.element.parentElement) === this._element) {
6090
- var _this$panel$view$cont, _this$panel$view$cont2;
6091
- this.panel.view.content.element.remove();
6092
- (_this$panel$view$cont = (_this$panel$view$cont2 = this.panel.view.content).onHide) === null || _this$panel$view$cont === void 0 || _this$panel$view$cont.call(_this$panel$view$cont2);
6087
+ var _options$asActive;
6088
+ const doRender = ((_options$asActive = options === null || options === void 0 ? void 0 : options.asActive) !== null && _options$asActive !== void 0 ? _options$asActive : true) || this.group.isPanelActive(panel);
6089
+ if (doRender || this.panel === panel) {
6090
+ var _this$panel;
6091
+ if (((_this$panel = this.panel) === null || _this$panel === void 0 ? void 0 : _this$panel.view.content.element.parentElement) === this._element) {
6092
+ var _this$panel$view$cont, _this$panel$view$cont2;
6093
+ this.panel.view.content.element.remove();
6094
+ (_this$panel$view$cont = (_this$panel$view$cont2 = this.panel.view.content).onHide) === null || _this$panel$view$cont === void 0 || _this$panel$view$cont.call(_this$panel$view$cont2);
6095
+ }
6096
+ this.panel = panel;
6093
6097
  }
6094
- this.panel = panel;
6095
6098
  let container;
6096
6099
  switch (panel.api.renderer) {
6097
6100
  case "onlyWhenVisible":
6098
6101
  this.group.renderContainer.detatch(panel);
6099
- if (this.panel) {
6100
- if (doRender) {
6101
- var _this$panel$view$cont3, _this$panel$view$cont4;
6102
- this._element.appendChild(this.panel.view.content.element);
6103
- (_this$panel$view$cont3 = (_this$panel$view$cont4 = this.panel.view.content).onShow) === null || _this$panel$view$cont3 === void 0 || _this$panel$view$cont3.call(_this$panel$view$cont4);
6104
- }
6102
+ if (doRender) {
6103
+ var _panel$view$content$o, _panel$view$content;
6104
+ this._element.appendChild(panel.view.content.element);
6105
+ (_panel$view$content$o = (_panel$view$content = panel.view.content).onShow) === null || _panel$view$content$o === void 0 || _panel$view$content$o.call(_panel$view$content);
6105
6106
  }
6106
6107
  container = this._element;
6107
6108
  break;
@@ -6130,9 +6131,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
6130
6131
  closePanel() {
6131
6132
  if (this.panel) {
6132
6133
  if (this.panel.api.renderer === "onlyWhenVisible") {
6133
- var _this$panel$view$cont5, _this$panel$view$cont6;
6134
+ var _this$panel$view$cont3, _this$panel$view$cont4;
6134
6135
  this.panel.view.content.element.remove();
6135
- (_this$panel$view$cont5 = (_this$panel$view$cont6 = this.panel.view.content).onHide) === null || _this$panel$view$cont5 === void 0 || _this$panel$view$cont5.call(_this$panel$view$cont6);
6136
+ (_this$panel$view$cont3 = (_this$panel$view$cont4 = this.panel.view.content).onHide) === null || _this$panel$view$cont3 === void 0 || _this$panel$view$cont3.call(_this$panel$view$cont4);
6136
6137
  }
6137
6138
  }
6138
6139
  this.panel = void 0;
@@ -11165,7 +11166,6 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
11165
11166
  this.rerender(panel);
11166
11167
  });
11167
11168
  if (this._activePanel) {
11168
- this.contentContainer.renderPanel(this._activePanel, { asActive: true });
11169
11169
  const { width, height } = this.contentDimensions();
11170
11170
  this._activePanel.layout(width, height);
11171
11171
  }