Skip to content

pivotick v3.0.0


pivotick / GraphUI / DockTabHandle

Interface: DockTabHandle ​

Defined in: interfaces/GraphUI.ts:1309

What a live dock tab gets to drive itself with — passed to its own render, toolbar and activation hooks. It lets a tab bring itself to the front or unregister without capturing the graph, the dock, or the disposer addDockTab returned.

Methods ​

activate() ​

activate(): void

Defined in: interfaces/GraphUI.ts:1315

Bring this tab to the front, unfolding the dock if it is folded.

Returns ​

void


refresh() ​

refresh(): void

Defined in: interfaces/GraphUI.ts:1325

Rebuild this tab's body: render is called again and what it returns replaces what is there.

This is how a pane with its own internal views switches between them — the data table does exactly this for Nodes / Edges. Doing it by hand is not an option: the dock keeps the element render gave it, so an occupant that swapped its own DOM would leave the dock holding a stale reference to re-attach later.

Returns ​

void


remove() ​

remove(): void

Defined in: interfaces/GraphUI.ts:1333

Unregister the tab and take its DOM with it.

Returns ​

void


setLabel() ​

setLabel(label): void

Defined in: interfaces/GraphUI.ts:1331

Rename the tab in the strip. Nothing else moves — the body, its scroll position and whether the tab is on show all survive, which re-registering the tab to change a word would not. This is how a pane carries a live count.

Parameters ​

label ​

string

Returns ​

void

Properties ​

active ​

readonly active: boolean

Defined in: interfaces/GraphUI.ts:1313

Whether this is the tab currently on show.


id ​

readonly id: string

Defined in: interfaces/GraphUI.ts:1311

The tab's id — the declared one, or the auto-generated one.