DockManager
Defined in: js-api/src/docking.ts:118
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:121
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
DockManager
Properties
| Property | Type | Defined in |
|---|---|---|
dart | any | js-api/src/docking.ts:119 |
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:125
Returns
HTMLDivElement
onClosed
Get Signature
get onClosed():
Observable<HTMLElement>
Defined in: js-api/src/docking.ts:191
Returns
Observable<HTMLElement>
onPanelHidden
Get Signature
get onPanelHidden():
Observable<HTMLElement>
Defined in: js-api/src/docking.ts:199
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:195
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
Returns
Methods
close()
close(
object):void
Defined in: js-api/src/docking.ts:173
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:160
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 | Name of the resulting column. Default value is agg(colName). |
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:187
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