Skip to main content

Class: DockManager

dg.DockManager

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)

Parameters

NameType
dartany

Defined in

src/docking.ts:99

Properties

dart

dart: any

Defined in

src/docking.ts:97

Accessors

documentContainer

get documentContainer(): DockContainer

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

DockContainer

Defined in

src/docking.ts:116


element

get element(): HTMLDivElement

Returns

HTMLDivElement

Defined in

src/docking.ts:103


rootNode

get rootNode(): DockNode

Returns

DockNode

Defined in

src/docking.ts:107

Methods

close

close(object): void

Undocks the element.

Parameters

NameTypeDescription
objectHTMLElement | DockNodeElement to undock

Returns

void

Defined in

src/docking.ts:137


dock

dock(element, dockType?, refNode?, title?, ratio?): DockNode

Docks the element relative to the reference node.

Parameters

NameTypeDefault valueDescription
elementHTMLElement | Viewer<any>undefinedElement to dock
dockType"fill" | "left" | "right" | "up" | "down"DG.DOCK_TYPE.LEFTDock type (left | right | top | down | fill).
refNodenull | DockNodenullreference node
title?stringundefinedName of the resulting column. Default value is agg(colName).
rationumber0.5Ratio of the area to take (relative to the reference node).

Returns

DockNode

Defined in

src/docking.ts:129


findNode

findNode(element): undefined | DockNode

Finds the node of an element.

Parameters

NameTypeDescription
elementHTMLElementElement to find the node for.

Returns

undefined | DockNode

if node is found, undefined otherwise.

Defined in

src/docking.ts:151