dockview-core 1.14.1 → 1.14.2

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 1.14.1
3
+ * @version 1.14.2
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -6177,52 +6177,40 @@ define(['exports'], (function (exports) { 'use strict';
6177
6177
  }
6178
6178
  constructor() {
6179
6179
  super();
6180
- //
6181
- this.params = {};
6182
6180
  this._element = document.createElement('div');
6183
6181
  this._element.className = 'dv-default-tab';
6184
- //
6185
6182
  this._content = document.createElement('div');
6186
6183
  this._content.className = 'dv-default-tab-content';
6187
6184
  this.action = document.createElement('div');
6188
6185
  this.action.className = 'dv-default-tab-action';
6189
6186
  this.action.appendChild(createCloseButton());
6190
- //
6191
6187
  this._element.appendChild(this._content);
6192
6188
  this._element.appendChild(this.action);
6193
- //
6194
6189
  this.addDisposables(addDisposableListener(this.action, 'mousedown', (ev) => {
6195
6190
  ev.preventDefault();
6196
6191
  }));
6197
6192
  this.render();
6198
6193
  }
6199
- update(event) {
6200
- this.params = Object.assign(Object.assign({}, this.params), event.params);
6201
- this.render();
6202
- }
6203
- focus() {
6204
- //noop
6205
- }
6206
6194
  init(params) {
6207
- this.params = params;
6208
- this._content.textContent = params.title;
6209
- addDisposableListener(this.action, 'click', (ev) => {
6210
- ev.preventDefault(); //
6211
- this.params.api.close();
6212
- });
6213
- }
6214
- onGroupChange(_group) {
6215
- this.render();
6216
- }
6217
- onPanelVisibleChange(_isPanelVisible) {
6195
+ this._title = params.title;
6196
+ this.addDisposables(params.api.onDidTitleChange((event) => {
6197
+ this._title = event.title;
6198
+ this.render();
6199
+ }), addDisposableListener(this.action, 'mousedown', (ev) => {
6200
+ ev.preventDefault();
6201
+ }), addDisposableListener(this.action, 'click', (ev) => {
6202
+ if (ev.defaultPrevented) {
6203
+ return;
6204
+ }
6205
+ ev.preventDefault();
6206
+ params.api.close();
6207
+ }));
6218
6208
  this.render();
6219
6209
  }
6220
- layout(_width, _height) {
6221
- // noop
6222
- }
6223
6210
  render() {
6224
- if (this._content.textContent !== this.params.title) {
6225
- this._content.textContent = this.params.title;
6211
+ var _a;
6212
+ if (this._content.textContent !== this._title) {
6213
+ this._content.textContent = (_a = this._title) !== null && _a !== void 0 ? _a : '';
6226
6214
  }
6227
6215
  }
6228
6216
  }