rune-langium / visual-editor/src / RuneTypeGraphCallbacks
Interface: RuneTypeGraphCallbacks
Defined in: packages/visual-editor/src/types.ts:473
Event callbacks for the RuneTypeGraph component.
Remarks
All callbacks are optional. onModelChanged fires after every committed edit with the full serialized model as a Map<namespace, rosettaSource>. Use it to persist model state.
Pitfalls
onModelChangedmay fire frequently during drag operations — debounce it before persisting to disk or a backend.onValidationChangefires synchronously after each model mutation and may deliver validation errors before the UI has fully re-rendered.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
onContextMenu? | (position) => void | - | packages/visual-editor/src/types.ts:479 |
onEdgeSelect? | (edgeId, data) => void | - | packages/visual-editor/src/types.ts:477 |
onModelChanged? | (serialized) => void | - | packages/visual-editor/src/types.ts:482 |
onNavigateToType? | NavigateToNodeCallback | Called when a type reference is clicked within a graph node (e.g., attribute type name). | packages/visual-editor/src/types.ts:476 |
onNodeDoubleClick? | (nodeId, data) => void | - | packages/visual-editor/src/types.ts:474 |
onSelectionClear? | () => void | - | packages/visual-editor/src/types.ts:478 |
onTypeCreated? | (nodeId, kind, name) => void | - | packages/visual-editor/src/types.ts:480 |
onTypeDeleted? | (nodeId) => void | - | packages/visual-editor/src/types.ts:481 |
onValidationChange? | (errors) => void | - | packages/visual-editor/src/types.ts:483 |