Skip to content

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

  • onModelChanged may fire frequently during drag operations — debounce it before persisting to disk or a backend.
  • onValidationChange fires synchronously after each model mutation and may deliver validation errors before the UI has fully re-rendered.

Properties

PropertyTypeDescriptionDefined 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?NavigateToNodeCallbackCalled 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

Core packages released under MIT. Studio app released under FSL-1.1-ALv2.