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.
- package/dist/cjs/dockview/components/tab/defaultTab.d.ts +1 -8
- package/dist/cjs/dockview/components/tab/defaultTab.js +16 -39
- package/dist/dockview-core.amd.js +17 -29
- package/dist/dockview-core.amd.js.map +1 -1
- package/dist/dockview-core.amd.min.js +2 -2
- package/dist/dockview-core.amd.min.js.map +1 -1
- package/dist/dockview-core.amd.min.noStyle.js +2 -2
- package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
- package/dist/dockview-core.amd.noStyle.js +17 -29
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +17 -29
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +17 -29
- package/dist/dockview-core.esm.js.map +1 -1
- package/dist/dockview-core.esm.min.js +2 -2
- package/dist/dockview-core.esm.min.js.map +1 -1
- package/dist/dockview-core.js +17 -29
- package/dist/dockview-core.js.map +1 -1
- package/dist/dockview-core.min.js +2 -2
- package/dist/dockview-core.min.js.map +1 -1
- package/dist/dockview-core.min.noStyle.js +2 -2
- package/dist/dockview-core.min.noStyle.js.map +1 -1
- package/dist/dockview-core.noStyle.js +17 -29
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/dockview/components/tab/defaultTab.d.ts +1 -8
- package/dist/esm/dockview/components/tab/defaultTab.js +16 -28
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 1.14.
|
|
3
|
+
* @version 1.14.2
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -6205,52 +6205,40 @@ class DefaultTab extends CompositeDisposable {
|
|
|
6205
6205
|
}
|
|
6206
6206
|
constructor() {
|
|
6207
6207
|
super();
|
|
6208
|
-
//
|
|
6209
|
-
this.params = {};
|
|
6210
6208
|
this._element = document.createElement('div');
|
|
6211
6209
|
this._element.className = 'dv-default-tab';
|
|
6212
|
-
//
|
|
6213
6210
|
this._content = document.createElement('div');
|
|
6214
6211
|
this._content.className = 'dv-default-tab-content';
|
|
6215
6212
|
this.action = document.createElement('div');
|
|
6216
6213
|
this.action.className = 'dv-default-tab-action';
|
|
6217
6214
|
this.action.appendChild(createCloseButton());
|
|
6218
|
-
//
|
|
6219
6215
|
this._element.appendChild(this._content);
|
|
6220
6216
|
this._element.appendChild(this.action);
|
|
6221
|
-
//
|
|
6222
6217
|
this.addDisposables(addDisposableListener(this.action, 'mousedown', (ev) => {
|
|
6223
6218
|
ev.preventDefault();
|
|
6224
6219
|
}));
|
|
6225
6220
|
this.render();
|
|
6226
6221
|
}
|
|
6227
|
-
update(event) {
|
|
6228
|
-
this.params = Object.assign(Object.assign({}, this.params), event.params);
|
|
6229
|
-
this.render();
|
|
6230
|
-
}
|
|
6231
|
-
focus() {
|
|
6232
|
-
//noop
|
|
6233
|
-
}
|
|
6234
6222
|
init(params) {
|
|
6235
|
-
this.
|
|
6236
|
-
this.
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6223
|
+
this._title = params.title;
|
|
6224
|
+
this.addDisposables(params.api.onDidTitleChange((event) => {
|
|
6225
|
+
this._title = event.title;
|
|
6226
|
+
this.render();
|
|
6227
|
+
}), addDisposableListener(this.action, 'mousedown', (ev) => {
|
|
6228
|
+
ev.preventDefault();
|
|
6229
|
+
}), addDisposableListener(this.action, 'click', (ev) => {
|
|
6230
|
+
if (ev.defaultPrevented) {
|
|
6231
|
+
return;
|
|
6232
|
+
}
|
|
6233
|
+
ev.preventDefault();
|
|
6234
|
+
params.api.close();
|
|
6235
|
+
}));
|
|
6246
6236
|
this.render();
|
|
6247
6237
|
}
|
|
6248
|
-
layout(_width, _height) {
|
|
6249
|
-
// noop
|
|
6250
|
-
}
|
|
6251
6238
|
render() {
|
|
6252
|
-
|
|
6253
|
-
|
|
6239
|
+
var _a;
|
|
6240
|
+
if (this._content.textContent !== this._title) {
|
|
6241
|
+
this._content.textContent = (_a = this._title) !== null && _a !== void 0 ? _a : '';
|
|
6254
6242
|
}
|
|
6255
6243
|
}
|
|
6256
6244
|
}
|