DockManager
Defined in: js-api/src/docking.ts:116
Window docking manager.
Dock manager manages all the dock panels in a hierarchy, similar to visual studio. It owns an HTML Div element inside which all panels are docked. Initially, the dock manager takes up the central space and acts as the root node.
Samples: https://public.datagrok.ai/js/samples/ui/docking/docking Learn more: https://github.com/coderespawn/dock-spawn for details.
Constructors
Constructor
new DockManager(
dart):DockManager
Defined in: js-api/src/docking.ts:119
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
DockManager
Properties
| Property | Type | Defined in |
|---|---|---|
dart | any | js-api/src/docking.ts:117 |
Accessors
documentContainer
Get Signature
get documentContainer():
DockContainer
Defined in: js-api/src/docking.ts:138
The document view is then central area of the dock layout hierarchy. This is where more important panels are placed (e.g. the text editor in an IDE, 3D view in a modeling package, etc.)
Returns
element
Get Signature
get element():
HTMLDivElement
Defined in: js-api/src/docking.ts:124
The element that hosts the docked panels.
Returns
HTMLDivElement
onClosed
Get Signature
get onClosed():
Observable<HTMLElement>
Defined in: js-api/src/docking.ts:188
Fires when a docked panel is closed; emits its content element.
Returns
Observable<HTMLElement>
onPanelHidden
Get Signature
get onPanelHidden():
Observable<HTMLElement>
Defined in: js-api/src/docking.ts:196
Fires when a panel stops being visible: its tab is deselected, it is undocked without being re-docked, or it is closed. Emits the panel's content element.
Returns
Observable<HTMLElement>
onPanelShown
Get Signature
get onPanelShown():
Observable<HTMLElement>
Defined in: js-api/src/docking.ts:192
Fires when a panel becomes visible: its tab is selected, it is docked into a visible position, or it is floated into a dialog. Emits the panel's content element.
Returns
Observable<HTMLElement>
rootNode
Get Signature
get rootNode():
DockNode
Defined in: js-api/src/docking.ts:129
The root of the dock tree.
Returns
Methods
close()
close(
object):void
Defined in: js-api/src/docking.ts:170
Undocks the element.
Parameters
| Parameter | Type | Description |
|---|---|---|
object | HTMLElement | DockNode | Element to undock |
Returns
void
dock()
dock(
element,dockType?,refNode?,title?,ratio?,options?):DockNode
Defined in: js-api/src/docking.ts:158
Docks the element relative to the reference node.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
element | HTMLElement | Viewer<any> | undefined | Element to dock |
dockType | "fill" | "left" | "right" | "up" | "down" | DG.DOCK_TYPE.LEFT | Dock type (left |
refNode | DockNode | null | null | reference node |
title? | string | undefined | Caption of the docked panel. |
ratio? | number | 0.5 | Ratio of the area to take (relative to the reference node). |
options? | IDockOptions | undefined | killOnClose: kill the element when its pane is closed via the ✕ button — runs cleanups registered with Widget.registerCleanup and detaches nested widgets. Off by default; panes that are closed and later reused must not opt in. |
Returns
findNode()
findNode(
element):DockNode|undefined
Defined in: js-api/src/docking.ts:183
Finds the node of an element.
Parameters
| Parameter | Type | Description |
|---|---|---|
element | HTMLElement | Element to find the node for. |
Returns
DockNode | undefined
if node is found, undefined otherwise.
loadState()
loadState(
state):void
Defined in: js-api/src/docking.ts:146
Restores a dock layout previously produced by saveState.
Parameters
| Parameter | Type |
|---|---|
state | string |
Returns
void
saveState()
saveState():
string
Defined in: js-api/src/docking.ts:143
Serializes the current dock layout (panel tree, sizes, orientations) to a JSON string.
Returns
string