Skip to content
Entangle UI v0.13.0

NodeGraphHandle

Defined in: src/components/editor/NodeGraph/NodeGraph.types.ts:300

centerOn(point, zoom?): void

Defined in: src/components/editor/NodeGraph/NodeGraph.types.ts:308

Center on a world point, optionally setting zoom.

Point2D

number

void


fitToContent(padding?): void

Defined in: src/components/editor/NodeGraph/NodeGraph.types.ts:302

Pan/zoom so all nodes fit inside the viewport with optional padding.

number

void


fitToSelection(padding?): void

Defined in: src/components/editor/NodeGraph/NodeGraph.types.ts:304

Pan/zoom so all selected nodes fit. No-op when selection is empty.

number

void


focusNode(id): void

Defined in: src/components/editor/NodeGraph/NodeGraph.types.ts:306

Center the viewport on a specific node.

string

void


getSize(): ViewportSize

Defined in: src/components/editor/NodeGraph/NodeGraph.types.ts:314

Read the current viewport size in CSS pixels.

ViewportSize


getTransform(): ViewportTransform

Defined in: src/components/editor/NodeGraph/NodeGraph.types.ts:312

Read the current transform.

ViewportTransform


invalidate(layerName?): void

Defined in: src/components/editor/NodeGraph/NodeGraph.types.ts:324

Force a redraw. With no layerName, all canvas layers redraw on the next frame; with a name ('edges' | 'groups' | 'preview'), only that layer redraws.

NodeGraphLayerName

void


screenToWorld(point): Point2D

Defined in: src/components/editor/NodeGraph/NodeGraph.types.ts:318

Convert a screen (CSS-pixel) point to a world point.

Point2D

Point2D


worldToScreen(point): Point2D

Defined in: src/components/editor/NodeGraph/NodeGraph.types.ts:316

Convert a world point to a screen (CSS-pixel) point.

Point2D

Point2D


zoomToRect(rect, padding?): void

Defined in: src/components/editor/NodeGraph/NodeGraph.types.ts:310

Pan/zoom to fit a world rectangle.

WorldRect

number

void