flexlayout-react 0.6.3 → 0.6.4
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/ChangeLog.txt +4 -0
- package/README.md +1 -1
- package/declarations/model/Model.d.ts +1 -2
- package/declarations/model/RowNode.d.ts +0 -2
- package/dist/flexlayout.js +193 -319
- package/dist/flexlayout_min.js +1 -1
- package/lib/Attribute.js +1 -1
- package/lib/Attribute.js.map +1 -1
- package/lib/AttributeDefinitions.js +13 -9
- package/lib/AttributeDefinitions.js.map +1 -1
- package/lib/DockLocation.js +6 -6
- package/lib/DockLocation.js.map +1 -1
- package/lib/DragDrop.js +24 -22
- package/lib/DragDrop.js.map +1 -1
- package/lib/Orientation.js +1 -1
- package/lib/Orientation.js.map +1 -1
- package/lib/PopupMenu.js +6 -6
- package/lib/PopupMenu.js.map +1 -1
- package/lib/Rect.js +1 -1
- package/lib/Rect.js.map +1 -1
- package/lib/model/BorderNode.js +31 -31
- package/lib/model/BorderNode.js.map +1 -1
- package/lib/model/BorderSet.js +18 -14
- package/lib/model/BorderSet.js.map +1 -1
- package/lib/model/Model.js +40 -35
- package/lib/model/Model.js.map +1 -1
- package/lib/model/Node.js +29 -28
- package/lib/model/Node.js.map +1 -1
- package/lib/model/RowNode.js +53 -50
- package/lib/model/RowNode.js.map +1 -1
- package/lib/model/SplitterNode.js +11 -11
- package/lib/model/SplitterNode.js.map +1 -1
- package/lib/model/TabNode.js +17 -17
- package/lib/model/TabNode.js.map +1 -1
- package/lib/model/TabSetNode.js +52 -51
- package/lib/model/TabSetNode.js.map +1 -1
- package/lib/model/Utils.js +3 -3
- package/lib/model/Utils.js.map +1 -1
- package/lib/view/BorderButton.js +52 -12
- package/lib/view/BorderButton.js.map +1 -1
- package/lib/view/BorderTabSet.js +4 -4
- package/lib/view/BorderTabSet.js.map +1 -1
- package/lib/view/ErrorBoundary.js +1 -1
- package/lib/view/ErrorBoundary.js.map +1 -1
- package/lib/view/FloatingWindow.js +27 -16
- package/lib/view/FloatingWindow.js.map +1 -1
- package/lib/view/FloatingWindowTab.js +1 -1
- package/lib/view/FloatingWindowTab.js.map +1 -1
- package/lib/view/Layout.js +80 -75
- package/lib/view/Layout.js.map +1 -1
- package/lib/view/Splitter.js +1 -1
- package/lib/view/Splitter.js.map +1 -1
- package/lib/view/Tab.js +5 -5
- package/lib/view/Tab.js.map +1 -1
- package/lib/view/TabButton.js +10 -15
- package/lib/view/TabButton.js.map +1 -1
- package/lib/view/TabButtonStamp.js +2 -2
- package/lib/view/TabButtonStamp.js.map +1 -1
- package/lib/view/TabFloating.js +2 -2
- package/lib/view/TabFloating.js.map +1 -1
- package/lib/view/TabOverflowHook.js +1 -1
- package/lib/view/TabOverflowHook.js.map +1 -1
- package/lib/view/TabSet.js +16 -12
- package/lib/view/TabSet.js.map +1 -1
- package/lib/view/Utils.js +3 -3
- package/lib/view/Utils.js.map +1 -1
- package/package.json +20 -14
- package/src/Attribute.ts +1 -1
- package/src/AttributeDefinitions.ts +9 -9
- package/src/DockLocation.ts +9 -9
- package/src/DragDrop.ts +42 -38
- package/src/Orientation.ts +2 -2
- package/src/PopupMenu.tsx +4 -4
- package/src/Rect.ts +1 -1
- package/src/model/BorderNode.ts +29 -28
- package/src/model/BorderSet.ts +16 -16
- package/src/model/IDraggable.ts +2 -2
- package/src/model/IDropTarget.ts +3 -3
- package/src/model/Model.ts +41 -41
- package/src/model/Node.ts +38 -38
- package/src/model/RowNode.ts +46 -44
- package/src/model/SplitterNode.ts +11 -11
- package/src/model/TabNode.ts +21 -21
- package/src/model/TabSetNode.ts +46 -44
- package/src/model/Utils.ts +3 -3
- package/src/view/BorderButton.tsx +82 -14
- package/src/view/BorderTabSet.tsx +2 -2
- package/src/view/ErrorBoundary.tsx +3 -3
- package/src/view/FloatingWindow.tsx +8 -6
- package/src/view/FloatingWindowTab.tsx +2 -2
- package/src/view/Layout.tsx +93 -93
- package/src/view/Splitter.tsx +2 -2
- package/src/view/Tab.tsx +3 -3
- package/src/view/TabButton.tsx +11 -15
- package/src/view/TabButtonStamp.tsx +2 -2
- package/src/view/TabFloating.tsx +2 -2
- package/src/view/TabOverflowHook.tsx +1 -1
- package/src/view/TabSet.tsx +2 -3
- package/src/view/Utils.tsx +3 -3
- package/style/_base.scss +1 -0
- package/style/dark.css +1 -0
- package/style/dark.css.map +1 -1
- package/style/gray.css +1 -0
- package/style/gray.css.map +1 -1
- package/style/light.css +1 -0
- package/style/light.css.map +1 -1
package/src/model/RowNode.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TabNode } from "
|
|
1
|
+
import { TabNode } from "./TabNode";
|
|
2
2
|
import { Attribute } from "../Attribute";
|
|
3
3
|
import { AttributeDefinitions } from "../AttributeDefinitions";
|
|
4
4
|
import { DockLocation } from "../DockLocation";
|
|
@@ -18,7 +18,7 @@ import { TabSetNode } from "./TabSetNode";
|
|
|
18
18
|
export class RowNode extends Node implements IDropTarget {
|
|
19
19
|
static readonly TYPE = "row";
|
|
20
20
|
|
|
21
|
-
/** @
|
|
21
|
+
/** @internal */
|
|
22
22
|
static _fromJson(json: any, model: Model) {
|
|
23
23
|
const newLayoutNode = new RowNode(model, json);
|
|
24
24
|
|
|
@@ -36,10 +36,10 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
36
36
|
|
|
37
37
|
return newLayoutNode;
|
|
38
38
|
}
|
|
39
|
-
/** @
|
|
39
|
+
/** @internal */
|
|
40
40
|
private static _attributeDefinitions: AttributeDefinitions = RowNode._createAttributeDefinitions();
|
|
41
41
|
|
|
42
|
-
/** @
|
|
42
|
+
/** @internal */
|
|
43
43
|
private static _createAttributeDefinitions(): AttributeDefinitions {
|
|
44
44
|
const attributeDefinitions = new AttributeDefinitions();
|
|
45
45
|
attributeDefinitions.add("type", RowNode.TYPE, true).setType(Attribute.STRING).setFixed();
|
|
@@ -51,19 +51,21 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
51
51
|
|
|
52
52
|
return attributeDefinitions;
|
|
53
53
|
}
|
|
54
|
-
/** @
|
|
54
|
+
/** @internal */
|
|
55
55
|
private _drawChildren: (TabSetNode | RowNode | SplitterNode)[];
|
|
56
|
-
|
|
57
|
-
private
|
|
56
|
+
/** @internal */
|
|
57
|
+
private _minHeight: number;
|
|
58
|
+
/** @internal */
|
|
59
|
+
private _minWidth: number;
|
|
58
60
|
|
|
59
|
-
/** @
|
|
61
|
+
/** @internal */
|
|
60
62
|
constructor(model: Model, json: any) {
|
|
61
63
|
super(model);
|
|
62
64
|
|
|
63
65
|
this._dirty = true;
|
|
64
66
|
this._drawChildren = [];
|
|
65
|
-
this.
|
|
66
|
-
this.
|
|
67
|
+
this._minHeight = 0;
|
|
68
|
+
this._minWidth = 0;
|
|
67
69
|
RowNode._attributeDefinitions.fromJson(json, this._attributes);
|
|
68
70
|
model._addNode(this);
|
|
69
71
|
}
|
|
@@ -80,12 +82,12 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
80
82
|
return this._getAttr("height") as number | undefined;
|
|
81
83
|
}
|
|
82
84
|
|
|
83
|
-
/** @
|
|
85
|
+
/** @internal */
|
|
84
86
|
_setWeight(weight: number) {
|
|
85
87
|
this._attributes.weight = weight;
|
|
86
88
|
}
|
|
87
89
|
|
|
88
|
-
/** @
|
|
90
|
+
/** @internal */
|
|
89
91
|
_layout(rect: Rect, metrics: ILayoutMetrics) {
|
|
90
92
|
super._layout(rect, metrics);
|
|
91
93
|
|
|
@@ -215,7 +217,7 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
215
217
|
return true;
|
|
216
218
|
}
|
|
217
219
|
|
|
218
|
-
/** @
|
|
220
|
+
/** @internal */
|
|
219
221
|
_getSplitterBounds(splitterNode: SplitterNode, useMinSize: boolean = false) {
|
|
220
222
|
const pBounds = [0, 0];
|
|
221
223
|
const drawChildren = this._getDrawChildren() as (RowNode | TabSetNode | SplitterNode)[];
|
|
@@ -236,7 +238,7 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
236
238
|
return pBounds;
|
|
237
239
|
}
|
|
238
240
|
|
|
239
|
-
/** @
|
|
241
|
+
/** @internal */
|
|
240
242
|
_calculateSplit(splitter: SplitterNode, splitterPos: number) {
|
|
241
243
|
let rtn;
|
|
242
244
|
const drawChildren = this._getDrawChildren() as (RowNode | TabSetNode | SplitterNode)[];
|
|
@@ -265,7 +267,7 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
265
267
|
return rtn;
|
|
266
268
|
}
|
|
267
269
|
|
|
268
|
-
/** @
|
|
270
|
+
/** @internal */
|
|
269
271
|
_getDrawChildren(): Node[] | undefined {
|
|
270
272
|
if (this._dirty) {
|
|
271
273
|
this._drawChildren = [];
|
|
@@ -285,7 +287,7 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
285
287
|
return this._drawChildren;
|
|
286
288
|
}
|
|
287
289
|
|
|
288
|
-
/** @
|
|
290
|
+
/** @internal */
|
|
289
291
|
getMinSize(orientation: Orientation) {
|
|
290
292
|
if (orientation === Orientation.HORZ) {
|
|
291
293
|
return this.getMinWidth();
|
|
@@ -294,44 +296,44 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
294
296
|
}
|
|
295
297
|
}
|
|
296
298
|
|
|
297
|
-
/** @
|
|
299
|
+
/** @internal */
|
|
298
300
|
getMinWidth() {
|
|
299
|
-
return this.
|
|
301
|
+
return this._minWidth;
|
|
300
302
|
}
|
|
301
303
|
|
|
302
|
-
/** @
|
|
304
|
+
/** @internal */
|
|
303
305
|
getMinHeight() {
|
|
304
|
-
return this.
|
|
306
|
+
return this._minHeight;
|
|
305
307
|
}
|
|
306
308
|
|
|
307
|
-
/** @
|
|
309
|
+
/** @internal */
|
|
308
310
|
calcMinSize() {
|
|
309
|
-
this.
|
|
310
|
-
this.
|
|
311
|
+
this._minHeight = 0;
|
|
312
|
+
this._minWidth = 0;
|
|
311
313
|
let first = true;
|
|
312
|
-
this._children
|
|
314
|
+
for (const child of this._children) {
|
|
313
315
|
const c = child as RowNode | TabSetNode;
|
|
314
316
|
if (c instanceof RowNode) {
|
|
315
317
|
c.calcMinSize();
|
|
316
318
|
}
|
|
317
319
|
if (this.getOrientation() === Orientation.VERT) {
|
|
318
|
-
this.
|
|
320
|
+
this._minHeight += c.getMinHeight();
|
|
319
321
|
if (!first) {
|
|
320
|
-
this.
|
|
322
|
+
this._minHeight += this._model.getSplitterSize();
|
|
321
323
|
}
|
|
322
|
-
this.
|
|
324
|
+
this._minWidth = Math.max(this._minWidth, c.getMinWidth());
|
|
323
325
|
} else {
|
|
324
|
-
this.
|
|
326
|
+
this._minWidth += c.getMinWidth();
|
|
325
327
|
if (!first) {
|
|
326
|
-
this.
|
|
328
|
+
this._minWidth += this._model.getSplitterSize();
|
|
327
329
|
}
|
|
328
|
-
this.
|
|
330
|
+
this._minHeight = Math.max(this._minHeight, c.getMinHeight());
|
|
329
331
|
}
|
|
330
332
|
first = false;
|
|
331
|
-
}
|
|
333
|
+
}
|
|
332
334
|
}
|
|
333
335
|
|
|
334
|
-
/** @
|
|
336
|
+
/** @internal */
|
|
335
337
|
_tidy() {
|
|
336
338
|
let i = 0;
|
|
337
339
|
while (i < this._children.length) {
|
|
@@ -391,7 +393,7 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
391
393
|
|
|
392
394
|
}
|
|
393
395
|
|
|
394
|
-
/** @
|
|
396
|
+
/** @internal */
|
|
395
397
|
canDrop(dragNode: Node & IDraggable, x: number, y: number): DropInfo | undefined {
|
|
396
398
|
const yy = y - this._rect.y;
|
|
397
399
|
const xx = x - this._rect.x;
|
|
@@ -437,7 +439,7 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
437
439
|
return dropInfo;
|
|
438
440
|
}
|
|
439
441
|
|
|
440
|
-
/** @
|
|
442
|
+
/** @internal */
|
|
441
443
|
drop(dragNode: Node & IDraggable, location: DockLocation, index: number): void {
|
|
442
444
|
const dockLocation = location;
|
|
443
445
|
|
|
@@ -484,9 +486,9 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
484
486
|
const hrow = new RowNode(this._model, {});
|
|
485
487
|
hrow._setWeight(75);
|
|
486
488
|
tabSet._setWeight(25);
|
|
487
|
-
this._children
|
|
489
|
+
for (const child of this._children) {
|
|
488
490
|
hrow._addChild(child);
|
|
489
|
-
}
|
|
491
|
+
}
|
|
490
492
|
this._removeAll();
|
|
491
493
|
vrow._addChild(tabSet);
|
|
492
494
|
vrow._addChild(hrow);
|
|
@@ -496,9 +498,9 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
496
498
|
const hrow = new RowNode(this._model, {});
|
|
497
499
|
hrow._setWeight(75);
|
|
498
500
|
tabSet._setWeight(25);
|
|
499
|
-
this._children
|
|
501
|
+
for (const child of this._children) {
|
|
500
502
|
hrow._addChild(child);
|
|
501
|
-
}
|
|
503
|
+
}
|
|
502
504
|
this._removeAll();
|
|
503
505
|
vrow._addChild(hrow);
|
|
504
506
|
vrow._addChild(tabSet);
|
|
@@ -515,9 +517,9 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
515
517
|
RowNode._attributeDefinitions.toJson(json, this._attributes);
|
|
516
518
|
|
|
517
519
|
json.children = [];
|
|
518
|
-
this._children
|
|
520
|
+
for (const child of this._children) {
|
|
519
521
|
json.children.push(child.toJson());
|
|
520
|
-
}
|
|
522
|
+
}
|
|
521
523
|
|
|
522
524
|
return json;
|
|
523
525
|
}
|
|
@@ -526,7 +528,7 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
526
528
|
return true;
|
|
527
529
|
}
|
|
528
530
|
|
|
529
|
-
/** @
|
|
531
|
+
/** @internal */
|
|
530
532
|
_getPrefSize(orientation: Orientation) {
|
|
531
533
|
let prefSize = this.getWidth();
|
|
532
534
|
if (orientation === Orientation.VERT) {
|
|
@@ -535,17 +537,17 @@ export class RowNode extends Node implements IDropTarget {
|
|
|
535
537
|
return prefSize;
|
|
536
538
|
}
|
|
537
539
|
|
|
538
|
-
/** @
|
|
540
|
+
/** @internal */
|
|
539
541
|
_getAttributeDefinitions() {
|
|
540
542
|
return RowNode._attributeDefinitions;
|
|
541
543
|
}
|
|
542
544
|
|
|
543
|
-
/** @
|
|
545
|
+
/** @internal */
|
|
544
546
|
_updateAttrs(json: any) {
|
|
545
547
|
RowNode._attributeDefinitions.update(json, this._attributes);
|
|
546
548
|
}
|
|
547
549
|
|
|
548
|
-
/** @
|
|
550
|
+
/** @internal */
|
|
549
551
|
static getAttributeDefinitions() {
|
|
550
552
|
return RowNode._attributeDefinitions;
|
|
551
553
|
}
|
|
@@ -6,7 +6,7 @@ import { Node } from "./Node";
|
|
|
6
6
|
export class SplitterNode extends Node {
|
|
7
7
|
static readonly TYPE: string = "splitter";
|
|
8
8
|
|
|
9
|
-
/** @
|
|
9
|
+
/** @internal */
|
|
10
10
|
constructor(model: Model) {
|
|
11
11
|
super(model);
|
|
12
12
|
this._fixed = true;
|
|
@@ -14,12 +14,12 @@ export class SplitterNode extends Node {
|
|
|
14
14
|
model._addNode(this);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
/** @
|
|
17
|
+
/** @internal */
|
|
18
18
|
getWidth() {
|
|
19
19
|
return this._model.getSplitterSize();
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
/** @
|
|
22
|
+
/** @internal */
|
|
23
23
|
getMinWidth() {
|
|
24
24
|
if (this.getOrientation() === Orientation.VERT) {
|
|
25
25
|
return this._model.getSplitterSize();
|
|
@@ -28,12 +28,12 @@ export class SplitterNode extends Node {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
/** @
|
|
31
|
+
/** @internal */
|
|
32
32
|
getHeight() {
|
|
33
33
|
return this._model.getSplitterSize();
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
/** @
|
|
36
|
+
/** @internal */
|
|
37
37
|
getMinHeight() {
|
|
38
38
|
if (this.getOrientation() === Orientation.HORZ) {
|
|
39
39
|
return this._model.getSplitterSize();
|
|
@@ -42,7 +42,7 @@ export class SplitterNode extends Node {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
/** @
|
|
45
|
+
/** @internal */
|
|
46
46
|
getMinSize(orientation: Orientation) {
|
|
47
47
|
if (orientation === Orientation.HORZ) {
|
|
48
48
|
return this.getMinWidth();
|
|
@@ -51,23 +51,23 @@ export class SplitterNode extends Node {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
/** @
|
|
54
|
+
/** @internal */
|
|
55
55
|
getWeight(): number {
|
|
56
56
|
return 0;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
/** @
|
|
59
|
+
/** @internal */
|
|
60
60
|
_setWeight(value: number): void { }
|
|
61
61
|
|
|
62
|
-
/** @
|
|
62
|
+
/** @internal */
|
|
63
63
|
_getPrefSize(orientation: Orientation): number {
|
|
64
64
|
return this._model.getSplitterSize();
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
/** @
|
|
67
|
+
/** @internal */
|
|
68
68
|
_updateAttrs(json: any): void { }
|
|
69
69
|
|
|
70
|
-
/** @
|
|
70
|
+
/** @internal */
|
|
71
71
|
_getAttributeDefinitions(): AttributeDefinitions {
|
|
72
72
|
return new AttributeDefinitions();
|
|
73
73
|
}
|
package/src/model/TabNode.ts
CHANGED
|
@@ -11,15 +11,15 @@ import { TabSetNode } from "./TabSetNode";
|
|
|
11
11
|
export class TabNode extends Node implements IDraggable {
|
|
12
12
|
static readonly TYPE = "tab";
|
|
13
13
|
|
|
14
|
-
/** @
|
|
14
|
+
/** @internal */
|
|
15
15
|
static _fromJson(json: any, model: Model, addToModel: boolean = true) {
|
|
16
16
|
const newLayoutNode = new TabNode(model, json, addToModel);
|
|
17
17
|
return newLayoutNode;
|
|
18
18
|
}
|
|
19
|
-
/** @
|
|
19
|
+
/** @internal */
|
|
20
20
|
private static _attributeDefinitions: AttributeDefinitions = TabNode._createAttributeDefinitions();
|
|
21
21
|
|
|
22
|
-
/** @
|
|
22
|
+
/** @internal */
|
|
23
23
|
private static _createAttributeDefinitions(): AttributeDefinitions {
|
|
24
24
|
const attributeDefinitions = new AttributeDefinitions();
|
|
25
25
|
attributeDefinitions.add("type", TabNode.TYPE, true).setType(Attribute.STRING);
|
|
@@ -45,16 +45,16 @@ export class TabNode extends Node implements IDraggable {
|
|
|
45
45
|
return attributeDefinitions;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
/** @
|
|
48
|
+
/** @internal */
|
|
49
49
|
private _tabRect?: Rect;
|
|
50
|
-
/** @
|
|
50
|
+
/** @internal */
|
|
51
51
|
private _renderedName?: string;
|
|
52
|
-
/** @
|
|
52
|
+
/** @internal */
|
|
53
53
|
private _extra: Record<string, any>;
|
|
54
|
-
/** @
|
|
54
|
+
/** @internal */
|
|
55
55
|
private _window?: Window;
|
|
56
56
|
|
|
57
|
-
/** @
|
|
57
|
+
/** @internal */
|
|
58
58
|
constructor(model: Model, json: any, addToModel: boolean = true) {
|
|
59
59
|
super(model);
|
|
60
60
|
|
|
@@ -74,17 +74,17 @@ export class TabNode extends Node implements IDraggable {
|
|
|
74
74
|
return this._tabRect;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
/** @
|
|
77
|
+
/** @internal */
|
|
78
78
|
_setTabRect(rect: Rect) {
|
|
79
79
|
this._tabRect = rect;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
/** @
|
|
82
|
+
/** @internal */
|
|
83
83
|
_setRenderedName(name: string) {
|
|
84
84
|
this._renderedName = name;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
/** @
|
|
87
|
+
/** @internal */
|
|
88
88
|
_getNameForOverflowMenu() {
|
|
89
89
|
const altName = this._getAttr("altName") as string;
|
|
90
90
|
if (altName !== undefined) {
|
|
@@ -160,7 +160,7 @@ export class TabNode extends Node implements IDraggable {
|
|
|
160
160
|
return this._getAttr("enableRenderOnDemand") as boolean;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
/** @
|
|
163
|
+
/** @internal */
|
|
164
164
|
_setName(name: string) {
|
|
165
165
|
this._attributes.name = name;
|
|
166
166
|
if (this._window && this._window.document) {
|
|
@@ -168,12 +168,12 @@ export class TabNode extends Node implements IDraggable {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
/** @
|
|
171
|
+
/** @internal */
|
|
172
172
|
_setFloating(float: boolean) {
|
|
173
173
|
this._attributes.floating = float;
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
/** @
|
|
176
|
+
/** @internal */
|
|
177
177
|
_layout(rect: Rect, metrics: ILayoutMetrics) {
|
|
178
178
|
if (!rect.equals(this._rect)) {
|
|
179
179
|
this._fireEvent("resize", { rect });
|
|
@@ -181,7 +181,7 @@ export class TabNode extends Node implements IDraggable {
|
|
|
181
181
|
this._rect = rect;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
/** @
|
|
184
|
+
/** @internal */
|
|
185
185
|
_delete() {
|
|
186
186
|
(this._parent as TabSetNode | BorderNode)._remove(this);
|
|
187
187
|
this._fireEvent("close", {});
|
|
@@ -193,32 +193,32 @@ export class TabNode extends Node implements IDraggable {
|
|
|
193
193
|
return json;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
/** @
|
|
196
|
+
/** @internal */
|
|
197
197
|
_updateAttrs(json: any) {
|
|
198
198
|
TabNode._attributeDefinitions.update(json, this._attributes);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
/** @
|
|
201
|
+
/** @internal */
|
|
202
202
|
_getAttributeDefinitions() {
|
|
203
203
|
return TabNode._attributeDefinitions;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
/** @
|
|
206
|
+
/** @internal */
|
|
207
207
|
_setWindow(window: Window | undefined) {
|
|
208
208
|
this._window = window;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
/** @
|
|
211
|
+
/** @internal */
|
|
212
212
|
_setBorderWidth(width: number) {
|
|
213
213
|
this._attributes.borderWidth = width;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
/** @
|
|
216
|
+
/** @internal */
|
|
217
217
|
_setBorderHeight(height: number) {
|
|
218
218
|
this._attributes.borderHeight = height;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
/** @
|
|
221
|
+
/** @internal */
|
|
222
222
|
static getAttributeDefinitions() {
|
|
223
223
|
return TabNode._attributeDefinitions;
|
|
224
224
|
}
|