Skip to content
D
Documentation

Interaction — interfaces v–w

reference
2 min readUpdated

Interfaces V–W

Import these from @grafloria/renderer.

Interfaces

ValidationIssue

One validation issue, resolved to the entity it is about.

ts
interface ValidationIssue

Properties

NameTypeDefaultDescription
entity'node' | 'link'
entityIdstring
severity'error' | 'warning'
messagestring
codestring

Waypoint

Represents a waypoint on a link path

ts
interface Waypoint

Properties

NameTypeDefaultDescription
indexnumber
pointPoint

WaypointHandle

Also has every member of Waypoint, listed on its own entry.

Waypoint handle for rendering

ts
interface WaypointHandle extends Waypoint

Properties

NameTypeDefaultDescription
linkIdstring

WaypointHitResult

Result of hit testing a waypoint

ts
interface WaypointHitResult

Properties

NameTypeDefaultDescription
waypointIndexnumber
waypointWaypoint
distancenumber

WhiteboardHost

The slice of a mounted diagram the whiteboard tools need. DiagramInstance satisfies it structurally, but a test can hand over a fake with four members instead of forty.

ts
interface WhiteboardHost

Properties

NameTypeDefaultDescription
viewportViewportController
containerHTMLElement
batch?(fn: () => void) => voidRun a multi-op commit as ONE undo step. A collab/undo-aware host passes replica.transact; the default runs it inline (a plain instance has no undo stack, and one add / N removes are still atomic to the model either way).

Members

  • getModel(): DiagramModel
  • render(): void — Queue a repaint after a commit.
  • getEngine?(): DiagramEngine | null — The command manager, when the host has one. DiagramInstance already exposes exactly this signature, so an embed keeps handing the instance over unchanged. The EDIT tool commits its translate through engine.commandManager so the gesture is Ctrl-Z-able; without an engine it falls back to a plain setPoints commit (still correct, still ONE op for collab — just not on an undo stack that doesn't exist).

Was this page helpful?

Interaction — interfaces v–w — Grafloria