Interfaces V–W
Import these from @grafloria/renderer.
Interfaces
ValidationIssue
One validation issue, resolved to the entity it is about.
tsinterface ValidationIssue
Properties
| Name | Type | Default | Description |
|---|---|---|---|
entity | 'node' | 'link' | ||
entityId | string | ||
severity | 'error' | 'warning' | ||
message | string | ||
code | string |
Waypoint
Represents a waypoint on a link path
tsinterface Waypoint
Properties
| Name | Type | Default | Description |
|---|---|---|---|
index | number | ||
point | Point |
WaypointHandle
Also has every member of Waypoint, listed on its own entry.
Waypoint handle for rendering
tsinterface WaypointHandle extends Waypoint
Properties
| Name | Type | Default | Description |
|---|---|---|---|
linkId | string |
WaypointHitResult
Result of hit testing a waypoint
tsinterface WaypointHitResult
Properties
| Name | Type | Default | Description |
|---|---|---|---|
waypointIndex | number | ||
waypoint | Waypoint | ||
distance | number |
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.
tsinterface WhiteboardHost
Properties
| Name | Type | Default | Description |
|---|---|---|---|
viewport | ViewportController | ||
container | HTMLElement | ||
batch? | (fn: () => void) => void | Run 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(): DiagramModelrender(): void— Queue a repaint after a commit.getEngine?(): DiagramEngine | null— The command manager, when the host has one.DiagramInstancealready exposes exactly this signature, so an embed keeps handing the instance over unchanged. The EDIT tool commits its translate throughengine.commandManagerso the gesture is Ctrl-Z-able; without an engine it falls back to a plainsetPointscommit (still correct, still ONE op for collab — just not on an undo stack that doesn't exist).
Was this page helpful?