dock-spawn-ts 2.513.0 → 2.514.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.
- package/lib/css/dock-manager.css +9 -1
- package/lib/es5/dock-spawn-ts.js +1 -1
- package/lib/js/ContainerType.d.ts +6 -6
- package/lib/js/ContainerType.js +7 -7
- package/lib/js/Dialog.d.ts +43 -43
- package/lib/js/Dialog.js +136 -136
- package/lib/js/DockConfig.d.ts +7 -7
- package/lib/js/DockConfig.js +8 -8
- package/lib/js/DockGraphDeserializer.d.ts +18 -18
- package/lib/js/DockGraphDeserializer.js +116 -116
- package/lib/js/DockGraphSerializer.d.ts +13 -13
- package/lib/js/DockGraphSerializer.js +40 -40
- package/lib/js/DockLayoutEngine.d.ts +35 -35
- package/lib/js/DockLayoutEngine.js +319 -319
- package/lib/js/DockManager.d.ts +153 -153
- package/lib/js/DockManager.js +728 -728
- package/lib/js/DockManagerContext.d.ts +9 -9
- package/lib/js/DockManagerContext.js +9 -9
- package/lib/js/DockModel.d.ts +8 -8
- package/lib/js/DockModel.js +5 -5
- package/lib/js/DockNode.d.ts +15 -15
- package/lib/js/DockNode.js +61 -61
- package/lib/js/DockWheel.d.ts +40 -40
- package/lib/js/DockWheel.js +200 -200
- package/lib/js/DockWheelItem.d.ts +15 -15
- package/lib/js/DockWheelItem.js +27 -27
- package/lib/js/DocumentManagerContainer.d.ts +16 -16
- package/lib/js/DocumentManagerContainer.js +28 -28
- package/lib/js/DocumentTabPage.d.ts +14 -14
- package/lib/js/DocumentTabPage.js +26 -26
- package/lib/js/DraggableContainer.d.ts +52 -52
- package/lib/js/DraggableContainer.js +183 -183
- package/lib/js/EventHandler.d.ts +7 -7
- package/lib/js/EventHandler.js +11 -11
- package/lib/js/Exports.d.ts +30 -30
- package/lib/js/Exports.js +30 -30
- package/lib/js/FillDockContainer.d.ts +33 -33
- package/lib/js/FillDockContainer.js +69 -69
- package/lib/js/HorizontalDockContainer.d.ts +6 -6
- package/lib/js/HorizontalDockContainer.js +9 -9
- package/lib/js/PanelContainer.d.ts +101 -101
- package/lib/js/PanelContainer.js +384 -384
- package/lib/js/PanelContainer.js.map +1 -1
- package/lib/js/Point.d.ts +5 -5
- package/lib/js/Point.js +6 -6
- package/lib/js/ResizableContainer.d.ts +55 -55
- package/lib/js/ResizableContainer.js +241 -241
- package/lib/js/ResizeHandle.d.ts +15 -15
- package/lib/js/ResizeHandle.js +48 -48
- package/lib/js/SplitterBar.d.ts +35 -35
- package/lib/js/SplitterBar.js +149 -149
- package/lib/js/SplitterDockContainer.d.ts +35 -35
- package/lib/js/SplitterDockContainer.js +65 -65
- package/lib/js/SplitterPanel.d.ts +26 -26
- package/lib/js/SplitterPanel.js +191 -191
- package/lib/js/TabHandle.d.ts +55 -55
- package/lib/js/TabHandle.js +261 -260
- package/lib/js/TabHandle.js.map +1 -1
- package/lib/js/TabHost.d.ts +46 -46
- package/lib/js/TabHost.js +223 -223
- package/lib/js/TabHost.js.map +1 -1
- package/lib/js/TabPage.d.ts +19 -19
- package/lib/js/TabPage.js +74 -73
- package/lib/js/TabPage.js.map +1 -1
- package/lib/js/UndockInitiator.d.ts +31 -31
- package/lib/js/UndockInitiator.js +140 -140
- package/lib/js/Utils.d.ts +14 -14
- package/lib/js/Utils.js +70 -69
- package/lib/js/Utils.js.map +1 -1
- package/lib/js/VerticalDockContainer.d.ts +6 -6
- package/lib/js/VerticalDockContainer.js +9 -9
- package/lib/js/enums/PanelType.d.ts +4 -4
- package/lib/js/enums/PanelType.js +5 -5
- package/lib/js/enums/TabHostDirection.d.ts +6 -6
- package/lib/js/enums/TabHostDirection.js +7 -7
- package/lib/js/enums/WheelTypes.d.ts +11 -11
- package/lib/js/enums/WheelTypes.js +14 -14
- package/lib/js/interfaces/IDockContainer.d.ts +25 -25
- package/lib/js/interfaces/IDockContainer.js +1 -1
- package/lib/js/interfaces/IDockContainerWithSize.d.ts +5 -5
- package/lib/js/interfaces/IDockContainerWithSize.js +1 -1
- package/lib/js/interfaces/ILayoutEventListener.d.ts +26 -26
- package/lib/js/interfaces/ILayoutEventListener.js +1 -1
- package/lib/js/interfaces/IMouseOrTouchEvent.d.ts +6 -6
- package/lib/js/interfaces/IMouseOrTouchEvent.js +1 -1
- package/lib/js/interfaces/INodeInfo.d.ts +7 -7
- package/lib/js/interfaces/INodeInfo.js +1 -1
- package/lib/js/interfaces/IPanelInfo.d.ts +9 -9
- package/lib/js/interfaces/IPanelInfo.js +1 -1
- package/lib/js/interfaces/IRectangle.d.ts +6 -6
- package/lib/js/interfaces/IRectangle.js +1 -1
- package/lib/js/interfaces/ISize.d.ts +4 -4
- package/lib/js/interfaces/ISize.js +1 -1
- package/lib/js/interfaces/IState.d.ts +10 -10
- package/lib/js/interfaces/IState.js +1 -1
- package/lib/js/interfaces/IThickness.d.ts +6 -6
- package/lib/js/interfaces/IThickness.js +1 -1
- package/lib/js/webcomponent/DockSpawnTsWebcomponent.d.ts +30 -30
- package/lib/js/webcomponent/DockSpawnTsWebcomponent.js +153 -152
- package/lib/js/webcomponent/DockSpawnTsWebcomponent.js.map +1 -1
- package/package.json +6 -6
- package/src/PanelContainer.ts +1 -1
- package/src/TabHost.ts +5 -5
- package/src/TabPage.ts +4 -3
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
import { DockModel } from "./DockModel.js";
|
|
2
|
-
import { DockNode } from "./DockNode.js";
|
|
3
|
-
import { PanelContainer } from "./PanelContainer.js";
|
|
4
|
-
import { HorizontalDockContainer } from "./HorizontalDockContainer.js";
|
|
5
|
-
import { VerticalDockContainer } from "./VerticalDockContainer.js";
|
|
6
|
-
import { DocumentManagerContainer } from "./DocumentManagerContainer.js";
|
|
7
|
-
import { FillDockContainer } from "./FillDockContainer.js";
|
|
8
|
-
import { Dialog } from "./Dialog.js";
|
|
9
|
-
import { Utils } from "./Utils.js";
|
|
10
|
-
/**
|
|
11
|
-
* Deserializes the dock layout hierarchy from JSON and creates a dock hierarhcy graph
|
|
12
|
-
*/
|
|
13
|
-
export class DockGraphDeserializer {
|
|
14
|
-
constructor(dockManager) {
|
|
15
|
-
this.dockManager = dockManager;
|
|
16
|
-
}
|
|
17
|
-
async deserialize(_json) {
|
|
18
|
-
let info = JSON.parse(_json);
|
|
19
|
-
let model = new DockModel();
|
|
20
|
-
model.rootNode = await this._buildGraph(info.graphInfo);
|
|
21
|
-
model.dialogs = await this._buildDialogs(info.dialogsInfo);
|
|
22
|
-
model.documentManagerNode = this.documentManagerNode;
|
|
23
|
-
return model;
|
|
24
|
-
}
|
|
25
|
-
async _buildGraph(nodeInfo) {
|
|
26
|
-
let childrenInfo = nodeInfo.children;
|
|
27
|
-
let children = [];
|
|
28
|
-
for (let childInfo of childrenInfo) {
|
|
29
|
-
let childNode = await this._buildGraph(childInfo);
|
|
30
|
-
if (childNode !== null) {
|
|
31
|
-
children.push(childNode);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
;
|
|
35
|
-
// Build the container owned by this node
|
|
36
|
-
let container = await this._createContainer(nodeInfo, children);
|
|
37
|
-
if (container === null) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
// Build the node for this container and attach it's children
|
|
41
|
-
let node = new DockNode(container);
|
|
42
|
-
if (container instanceof DocumentManagerContainer)
|
|
43
|
-
this.documentManagerNode = node;
|
|
44
|
-
node.children = children;
|
|
45
|
-
for (let childNode of node.children.reverse()) {
|
|
46
|
-
childNode.parent = node;
|
|
47
|
-
}
|
|
48
|
-
;
|
|
49
|
-
node.children.reverse();
|
|
50
|
-
// node.container.setActiveChild(node.container);
|
|
51
|
-
return node;
|
|
52
|
-
}
|
|
53
|
-
async _createContainer(nodeInfo, children) {
|
|
54
|
-
let containerType = nodeInfo.containerType;
|
|
55
|
-
let containerState = nodeInfo.state;
|
|
56
|
-
let container;
|
|
57
|
-
let childContainers = [];
|
|
58
|
-
for (let childNode of children) {
|
|
59
|
-
childContainers.push(childNode.container);
|
|
60
|
-
}
|
|
61
|
-
if (containerType === 'panel') {
|
|
62
|
-
container = await PanelContainer.loadFromState(containerState, this.dockManager);
|
|
63
|
-
if (!container.prepareForDocking)
|
|
64
|
-
return null;
|
|
65
|
-
container.prepareForDocking();
|
|
66
|
-
Utils.removeNode(container.elementPanel);
|
|
67
|
-
}
|
|
68
|
-
else if (containerType === 'horizontal')
|
|
69
|
-
container = new HorizontalDockContainer(this.dockManager, childContainers);
|
|
70
|
-
else if (containerType === 'vertical')
|
|
71
|
-
container = new VerticalDockContainer(this.dockManager, childContainers);
|
|
72
|
-
else if (containerType === 'fill') {
|
|
73
|
-
// Check if this is a document manager
|
|
74
|
-
// TODO: Layout engine compares the string 'fill', so cannot create another subclass type
|
|
75
|
-
// called document_manager and have to resort to this hack. use RTTI in layout engine
|
|
76
|
-
let typeDocumentManager = containerState.documentManager;
|
|
77
|
-
if (typeDocumentManager)
|
|
78
|
-
container = new DocumentManagerContainer(this.dockManager);
|
|
79
|
-
else
|
|
80
|
-
container = new FillDockContainer(this.dockManager);
|
|
81
|
-
}
|
|
82
|
-
else
|
|
83
|
-
throw new Error('Cannot create dock container of unknown type: ' + containerType);
|
|
84
|
-
// Restore the state of the container
|
|
85
|
-
container.loadState(containerState);
|
|
86
|
-
// container.performLayout(childContainers);
|
|
87
|
-
return container;
|
|
88
|
-
}
|
|
89
|
-
async _buildDialogs(dialogsInfo) {
|
|
90
|
-
let dialogs = [];
|
|
91
|
-
for (let dialogInfo of dialogsInfo) {
|
|
92
|
-
let containerType = dialogInfo.containerType;
|
|
93
|
-
let containerState = dialogInfo.state;
|
|
94
|
-
let container;
|
|
95
|
-
if (containerType === 'panel') {
|
|
96
|
-
container = await PanelContainer.loadFromState(containerState, this.dockManager);
|
|
97
|
-
if (container.prepareForDocking) {
|
|
98
|
-
Utils.removeNode(container.elementPanel);
|
|
99
|
-
container.isDialog = true;
|
|
100
|
-
let dialog = new Dialog(container, this.dockManager);
|
|
101
|
-
if (dialogInfo.position.x > document.body.clientWidth ||
|
|
102
|
-
dialogInfo.position.y > document.body.clientHeight - 70) {
|
|
103
|
-
dialogInfo.position.x = 20;
|
|
104
|
-
dialogInfo.position.y = 70;
|
|
105
|
-
}
|
|
106
|
-
dialog.setPosition(dialogInfo.position.x, dialogInfo.position.y);
|
|
107
|
-
dialog.isHidden = dialogInfo.isHidden;
|
|
108
|
-
if (dialog.isHidden)
|
|
109
|
-
dialog.hide();
|
|
110
|
-
dialogs.push(dialog);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return dialogs;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
1
|
+
import { DockModel } from "./DockModel.js";
|
|
2
|
+
import { DockNode } from "./DockNode.js";
|
|
3
|
+
import { PanelContainer } from "./PanelContainer.js";
|
|
4
|
+
import { HorizontalDockContainer } from "./HorizontalDockContainer.js";
|
|
5
|
+
import { VerticalDockContainer } from "./VerticalDockContainer.js";
|
|
6
|
+
import { DocumentManagerContainer } from "./DocumentManagerContainer.js";
|
|
7
|
+
import { FillDockContainer } from "./FillDockContainer.js";
|
|
8
|
+
import { Dialog } from "./Dialog.js";
|
|
9
|
+
import { Utils } from "./Utils.js";
|
|
10
|
+
/**
|
|
11
|
+
* Deserializes the dock layout hierarchy from JSON and creates a dock hierarhcy graph
|
|
12
|
+
*/
|
|
13
|
+
export class DockGraphDeserializer {
|
|
14
|
+
constructor(dockManager) {
|
|
15
|
+
this.dockManager = dockManager;
|
|
16
|
+
}
|
|
17
|
+
async deserialize(_json) {
|
|
18
|
+
let info = JSON.parse(_json);
|
|
19
|
+
let model = new DockModel();
|
|
20
|
+
model.rootNode = await this._buildGraph(info.graphInfo);
|
|
21
|
+
model.dialogs = await this._buildDialogs(info.dialogsInfo);
|
|
22
|
+
model.documentManagerNode = this.documentManagerNode;
|
|
23
|
+
return model;
|
|
24
|
+
}
|
|
25
|
+
async _buildGraph(nodeInfo) {
|
|
26
|
+
let childrenInfo = nodeInfo.children;
|
|
27
|
+
let children = [];
|
|
28
|
+
for (let childInfo of childrenInfo) {
|
|
29
|
+
let childNode = await this._buildGraph(childInfo);
|
|
30
|
+
if (childNode !== null) {
|
|
31
|
+
children.push(childNode);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
;
|
|
35
|
+
// Build the container owned by this node
|
|
36
|
+
let container = await this._createContainer(nodeInfo, children);
|
|
37
|
+
if (container === null) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
// Build the node for this container and attach it's children
|
|
41
|
+
let node = new DockNode(container);
|
|
42
|
+
if (container instanceof DocumentManagerContainer)
|
|
43
|
+
this.documentManagerNode = node;
|
|
44
|
+
node.children = children;
|
|
45
|
+
for (let childNode of node.children.reverse()) {
|
|
46
|
+
childNode.parent = node;
|
|
47
|
+
}
|
|
48
|
+
;
|
|
49
|
+
node.children.reverse();
|
|
50
|
+
// node.container.setActiveChild(node.container);
|
|
51
|
+
return node;
|
|
52
|
+
}
|
|
53
|
+
async _createContainer(nodeInfo, children) {
|
|
54
|
+
let containerType = nodeInfo.containerType;
|
|
55
|
+
let containerState = nodeInfo.state;
|
|
56
|
+
let container;
|
|
57
|
+
let childContainers = [];
|
|
58
|
+
for (let childNode of children) {
|
|
59
|
+
childContainers.push(childNode.container);
|
|
60
|
+
}
|
|
61
|
+
if (containerType === 'panel') {
|
|
62
|
+
container = await PanelContainer.loadFromState(containerState, this.dockManager);
|
|
63
|
+
if (!container.prepareForDocking)
|
|
64
|
+
return null;
|
|
65
|
+
container.prepareForDocking();
|
|
66
|
+
Utils.removeNode(container.elementPanel);
|
|
67
|
+
}
|
|
68
|
+
else if (containerType === 'horizontal')
|
|
69
|
+
container = new HorizontalDockContainer(this.dockManager, childContainers);
|
|
70
|
+
else if (containerType === 'vertical')
|
|
71
|
+
container = new VerticalDockContainer(this.dockManager, childContainers);
|
|
72
|
+
else if (containerType === 'fill') {
|
|
73
|
+
// Check if this is a document manager
|
|
74
|
+
// TODO: Layout engine compares the string 'fill', so cannot create another subclass type
|
|
75
|
+
// called document_manager and have to resort to this hack. use RTTI in layout engine
|
|
76
|
+
let typeDocumentManager = containerState.documentManager;
|
|
77
|
+
if (typeDocumentManager)
|
|
78
|
+
container = new DocumentManagerContainer(this.dockManager);
|
|
79
|
+
else
|
|
80
|
+
container = new FillDockContainer(this.dockManager);
|
|
81
|
+
}
|
|
82
|
+
else
|
|
83
|
+
throw new Error('Cannot create dock container of unknown type: ' + containerType);
|
|
84
|
+
// Restore the state of the container
|
|
85
|
+
container.loadState(containerState);
|
|
86
|
+
// container.performLayout(childContainers);
|
|
87
|
+
return container;
|
|
88
|
+
}
|
|
89
|
+
async _buildDialogs(dialogsInfo) {
|
|
90
|
+
let dialogs = [];
|
|
91
|
+
for (let dialogInfo of dialogsInfo) {
|
|
92
|
+
let containerType = dialogInfo.containerType;
|
|
93
|
+
let containerState = dialogInfo.state;
|
|
94
|
+
let container;
|
|
95
|
+
if (containerType === 'panel') {
|
|
96
|
+
container = await PanelContainer.loadFromState(containerState, this.dockManager);
|
|
97
|
+
if (container.prepareForDocking) {
|
|
98
|
+
Utils.removeNode(container.elementPanel);
|
|
99
|
+
container.isDialog = true;
|
|
100
|
+
let dialog = new Dialog(container, this.dockManager);
|
|
101
|
+
if (dialogInfo.position.x > document.body.clientWidth ||
|
|
102
|
+
dialogInfo.position.y > document.body.clientHeight - 70) {
|
|
103
|
+
dialogInfo.position.x = 20;
|
|
104
|
+
dialogInfo.position.y = 70;
|
|
105
|
+
}
|
|
106
|
+
dialog.setPosition(dialogInfo.position.x, dialogInfo.position.y);
|
|
107
|
+
dialog.isHidden = dialogInfo.isHidden;
|
|
108
|
+
if (dialog.isHidden)
|
|
109
|
+
dialog.hide();
|
|
110
|
+
dialogs.push(dialog);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return dialogs;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
117
|
//# sourceMappingURL=DockGraphDeserializer.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { DockModel } from "./DockModel.js";
|
|
2
|
-
import { DockNode } from "./DockNode.js";
|
|
3
|
-
import { Dialog } from "./Dialog.js";
|
|
4
|
-
import { IPanelInfo } from "./interfaces/IPanelInfo.js";
|
|
5
|
-
import { INodeInfo } from "./interfaces/INodeInfo.js";
|
|
6
|
-
/**
|
|
7
|
-
* The serializer saves / loads the state of the dock layout hierarchy
|
|
8
|
-
*/
|
|
9
|
-
export declare class DockGraphSerializer {
|
|
10
|
-
serialize(model: DockModel): string;
|
|
11
|
-
_buildGraphInfo(node: DockNode): INodeInfo;
|
|
12
|
-
_buildDialogsInfo(dialogs: Dialog[]): IPanelInfo[];
|
|
13
|
-
}
|
|
1
|
+
import { DockModel } from "./DockModel.js";
|
|
2
|
+
import { DockNode } from "./DockNode.js";
|
|
3
|
+
import { Dialog } from "./Dialog.js";
|
|
4
|
+
import { IPanelInfo } from "./interfaces/IPanelInfo.js";
|
|
5
|
+
import { INodeInfo } from "./interfaces/INodeInfo.js";
|
|
6
|
+
/**
|
|
7
|
+
* The serializer saves / loads the state of the dock layout hierarchy
|
|
8
|
+
*/
|
|
9
|
+
export declare class DockGraphSerializer {
|
|
10
|
+
serialize(model: DockModel): string;
|
|
11
|
+
_buildGraphInfo(node: DockNode): INodeInfo;
|
|
12
|
+
_buildDialogsInfo(dialogs: Dialog[]): IPanelInfo[];
|
|
13
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The serializer saves / loads the state of the dock layout hierarchy
|
|
3
|
-
*/
|
|
4
|
-
export class DockGraphSerializer {
|
|
5
|
-
serialize(model) {
|
|
6
|
-
let graphInfo = this._buildGraphInfo(model.rootNode);
|
|
7
|
-
let dialogs = this._buildDialogsInfo(model.dialogs.sort((x, y) => x.elementDialog.style.zIndex - y.elementDialog.style.zIndex));
|
|
8
|
-
return JSON.stringify({ graphInfo: graphInfo, dialogsInfo: dialogs });
|
|
9
|
-
}
|
|
10
|
-
_buildGraphInfo(node) {
|
|
11
|
-
let nodeState = {};
|
|
12
|
-
node.container.saveState(nodeState);
|
|
13
|
-
let childrenInfo = [];
|
|
14
|
-
node.children.forEach((childNode) => {
|
|
15
|
-
childrenInfo.push(this._buildGraphInfo(childNode));
|
|
16
|
-
});
|
|
17
|
-
let nodeInfo = {
|
|
18
|
-
containerType: node.container.containerType,
|
|
19
|
-
state: nodeState,
|
|
20
|
-
children: childrenInfo
|
|
21
|
-
};
|
|
22
|
-
return nodeInfo;
|
|
23
|
-
}
|
|
24
|
-
_buildDialogsInfo(dialogs) {
|
|
25
|
-
let dialogsInfo = [];
|
|
26
|
-
dialogs.forEach((dialog) => {
|
|
27
|
-
let panelState = {};
|
|
28
|
-
let panelContainer = dialog.panel;
|
|
29
|
-
panelContainer.saveState(panelState);
|
|
30
|
-
let panelInfo = {
|
|
31
|
-
containerType: panelContainer.containerType,
|
|
32
|
-
state: panelState,
|
|
33
|
-
position: dialog.getPosition(),
|
|
34
|
-
isHidden: dialog.isHidden
|
|
35
|
-
};
|
|
36
|
-
dialogsInfo.push(panelInfo);
|
|
37
|
-
});
|
|
38
|
-
return dialogsInfo;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* The serializer saves / loads the state of the dock layout hierarchy
|
|
3
|
+
*/
|
|
4
|
+
export class DockGraphSerializer {
|
|
5
|
+
serialize(model) {
|
|
6
|
+
let graphInfo = this._buildGraphInfo(model.rootNode);
|
|
7
|
+
let dialogs = this._buildDialogsInfo(model.dialogs.sort((x, y) => x.elementDialog.style.zIndex - y.elementDialog.style.zIndex));
|
|
8
|
+
return JSON.stringify({ graphInfo: graphInfo, dialogsInfo: dialogs });
|
|
9
|
+
}
|
|
10
|
+
_buildGraphInfo(node) {
|
|
11
|
+
let nodeState = {};
|
|
12
|
+
node.container.saveState(nodeState);
|
|
13
|
+
let childrenInfo = [];
|
|
14
|
+
node.children.forEach((childNode) => {
|
|
15
|
+
childrenInfo.push(this._buildGraphInfo(childNode));
|
|
16
|
+
});
|
|
17
|
+
let nodeInfo = {
|
|
18
|
+
containerType: node.container.containerType,
|
|
19
|
+
state: nodeState,
|
|
20
|
+
children: childrenInfo
|
|
21
|
+
};
|
|
22
|
+
return nodeInfo;
|
|
23
|
+
}
|
|
24
|
+
_buildDialogsInfo(dialogs) {
|
|
25
|
+
let dialogsInfo = [];
|
|
26
|
+
dialogs.forEach((dialog) => {
|
|
27
|
+
let panelState = {};
|
|
28
|
+
let panelContainer = dialog.panel;
|
|
29
|
+
panelContainer.saveState(panelState);
|
|
30
|
+
let panelInfo = {
|
|
31
|
+
containerType: panelContainer.containerType,
|
|
32
|
+
state: panelState,
|
|
33
|
+
position: dialog.getPosition(),
|
|
34
|
+
isHidden: dialog.isHidden
|
|
35
|
+
};
|
|
36
|
+
dialogsInfo.push(panelInfo);
|
|
37
|
+
});
|
|
38
|
+
return dialogsInfo;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
41
|
//# sourceMappingURL=DockGraphSerializer.js.map
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { DockManager } from "./DockManager.js";
|
|
2
|
-
import { DockNode } from "./DockNode.js";
|
|
3
|
-
import { HorizontalDockContainer } from "./HorizontalDockContainer.js";
|
|
4
|
-
import { VerticalDockContainer } from "./VerticalDockContainer.js";
|
|
5
|
-
import { FillDockContainer } from "./FillDockContainer.js";
|
|
6
|
-
import { IRectangle } from "./interfaces/IRectangle.js";
|
|
7
|
-
import { IDockContainer } from "./interfaces/IDockContainer.js";
|
|
8
|
-
import { TabHandle } from "./TabHandle.js";
|
|
9
|
-
export declare class DockLayoutEngine {
|
|
10
|
-
dockManager: DockManager;
|
|
11
|
-
constructor(dockManager: DockManager);
|
|
12
|
-
/** docks the [newNode] to the left of [referenceNode] */
|
|
13
|
-
dockLeft(referenceNode: DockNode, newNode: DockNode): void;
|
|
14
|
-
/** docks the [newNode] to the right of [referenceNode] */
|
|
15
|
-
dockRight(referenceNode: DockNode, newNode: DockNode): void;
|
|
16
|
-
/** docks the [newNode] to the top of [referenceNode] */
|
|
17
|
-
dockUp(referenceNode: DockNode, newNode: DockNode): void;
|
|
18
|
-
/** docks the [newNode] to the bottom of [referenceNode] */
|
|
19
|
-
dockDown(referenceNode: DockNode, newNode: DockNode): void;
|
|
20
|
-
/** docks the [newNode] by creating a new tab inside [referenceNode] */
|
|
21
|
-
dockFill(referenceNode: DockNode, newNode: DockNode): void;
|
|
22
|
-
undock(node: DockNode): void;
|
|
23
|
-
close(node: DockNode): void;
|
|
24
|
-
reorderTabs(node: DockNode, handle: TabHandle, state: string, index: number): void;
|
|
25
|
-
_performDock(referenceNode: DockNode, newNode: DockNode, direction: string, insertBeforeReference: boolean): void;
|
|
26
|
-
_forceResizeCompositeContainer: (container: IDockContainer) => void;
|
|
27
|
-
_createDockContainer(containerType: string, newNode: DockNode, referenceNode: DockNode): FillDockContainer | HorizontalDockContainer | VerticalDockContainer;
|
|
28
|
-
/**
|
|
29
|
-
* Gets the bounds of the new node if it were to dock with the specified configuration
|
|
30
|
-
* The state is not modified in this function. It is used for showing a preview of where
|
|
31
|
-
* the panel would be docked when hovered over a dock wheel button
|
|
32
|
-
*/
|
|
33
|
-
getDockBounds(referenceNode: DockNode, containerToDock: IDockContainer, direction: string, insertBeforeReference: boolean): IRectangle;
|
|
34
|
-
_getVaringDimension(container: IDockContainer, direction: string): number;
|
|
35
|
-
}
|
|
1
|
+
import { DockManager } from "./DockManager.js";
|
|
2
|
+
import { DockNode } from "./DockNode.js";
|
|
3
|
+
import { HorizontalDockContainer } from "./HorizontalDockContainer.js";
|
|
4
|
+
import { VerticalDockContainer } from "./VerticalDockContainer.js";
|
|
5
|
+
import { FillDockContainer } from "./FillDockContainer.js";
|
|
6
|
+
import { IRectangle } from "./interfaces/IRectangle.js";
|
|
7
|
+
import { IDockContainer } from "./interfaces/IDockContainer.js";
|
|
8
|
+
import { TabHandle } from "./TabHandle.js";
|
|
9
|
+
export declare class DockLayoutEngine {
|
|
10
|
+
dockManager: DockManager;
|
|
11
|
+
constructor(dockManager: DockManager);
|
|
12
|
+
/** docks the [newNode] to the left of [referenceNode] */
|
|
13
|
+
dockLeft(referenceNode: DockNode, newNode: DockNode): void;
|
|
14
|
+
/** docks the [newNode] to the right of [referenceNode] */
|
|
15
|
+
dockRight(referenceNode: DockNode, newNode: DockNode): void;
|
|
16
|
+
/** docks the [newNode] to the top of [referenceNode] */
|
|
17
|
+
dockUp(referenceNode: DockNode, newNode: DockNode): void;
|
|
18
|
+
/** docks the [newNode] to the bottom of [referenceNode] */
|
|
19
|
+
dockDown(referenceNode: DockNode, newNode: DockNode): void;
|
|
20
|
+
/** docks the [newNode] by creating a new tab inside [referenceNode] */
|
|
21
|
+
dockFill(referenceNode: DockNode, newNode: DockNode): void;
|
|
22
|
+
undock(node: DockNode): void;
|
|
23
|
+
close(node: DockNode): void;
|
|
24
|
+
reorderTabs(node: DockNode, handle: TabHandle, state: string, index: number): void;
|
|
25
|
+
_performDock(referenceNode: DockNode, newNode: DockNode, direction: string, insertBeforeReference: boolean): void;
|
|
26
|
+
_forceResizeCompositeContainer: (container: IDockContainer) => void;
|
|
27
|
+
_createDockContainer(containerType: string, newNode: DockNode, referenceNode: DockNode): FillDockContainer | HorizontalDockContainer | VerticalDockContainer;
|
|
28
|
+
/**
|
|
29
|
+
* Gets the bounds of the new node if it were to dock with the specified configuration
|
|
30
|
+
* The state is not modified in this function. It is used for showing a preview of where
|
|
31
|
+
* the panel would be docked when hovered over a dock wheel button
|
|
32
|
+
*/
|
|
33
|
+
getDockBounds(referenceNode: DockNode, containerToDock: IDockContainer, direction: string, insertBeforeReference: boolean): IRectangle;
|
|
34
|
+
_getVaringDimension(container: IDockContainer, direction: string): number;
|
|
35
|
+
}
|