Skip to content

pivotick v3.0.0


pivotick / GraphUI / Editors

Interface: Editors ​

Defined in: interfaces/GraphUI.ts:1181

Properties ​

deletion? ​

optional deletion: object

Defined in: interfaces/GraphUI.ts:1235

Deleting graph elements from the UI — the sidebar bulk-action Delete button and the node / edge / note context-menu delete entries. Every one of them is gated by InterractionCallbacks.onBeforeDelete; this switch decides whether they are shown in the first place.

enabled? ​

optional enabled: boolean

Offer the delete affordances at all. false removes them, which is what a read-only integration wants — cleaner than vetoing every click.

Default ​
ts
true

edgeCreator? ​

optional edgeCreator: object

Defined in: interfaces/GraphUI.ts:1221

Interactive edge creation — the Create ▸ Add edge tool (drag-to-connect and click-click alike) and the node context-menu's "Connect to…". What the new edge carries, and whether it is allowed, is decided by InterractionCallbacks.onBeforeEdgeCreate.

enabled? ​

optional enabled: boolean

Offer the connect affordances at all. false removes them, so a graph whose relations come only from the backend never arms a connect session.

Default ​
ts
true

edgeEditor? ​

optional edgeEditor: object

Defined in: interfaces/GraphUI.ts:1243

enabled? ​

optional enabled: boolean

Offer the edge editor at all. false hides the "Edit Edge" context-menu entry.

Default ​
ts
true

fields? ​

optional fields: FieldConfig[]

Optional field list for the edge edit modal. Inferred from the edge's data when undefined.

Default ​
ts
undefined

labelPrompt? ​

optional labelPrompt: EdgeLabelPromptMode

When set, every interactive edge create prompts the end-user for a label (stored on the new edge's data.label) using the chosen UI — no callback needed. An onBeforeEdgeCreate hook, if present, takes over and this is ignored (the hook can prompt itself via ctx.promptLabel).

Default ​
ts
undefined

render()? ​

optional render: (session) => HTMLDivElement

Optional custom body renderer for the edge edit modal — the static twin of InterractionCallbacks.onEdgeEdit. A custom body owns the draft: mutate session.draft as the user types.

Parameters ​
session ​

EdgeEditSession

Returns ​

HTMLDivElement

Default ​
ts
undefined

nodeCreator? ​

optional nodeCreator: object

Defined in: interfaces/GraphUI.ts:1208

Interactive node creation — the Create ▸ Add node tool and the canvas context-menu's "Add Node Here". What the new node carries is decided by InterractionCallbacks.onBeforeNodeCreate.

enabled? ​

optional enabled: boolean

Offer the create-node affordances at all.

Default ​
ts
true

nodeEditor? ​

optional nodeEditor: object

Defined in: interfaces/GraphUI.ts:1182

enabled? ​

optional enabled: boolean

Offer the node editor at all. false hides the Create ▸ Edit node tool — a consumer whose backend forbids edits removes the affordance rather than vetoing every commit.

Default ​
ts
true

fields? ​

optional fields: FieldConfig[]

Optional custom field generator. Inferred if undefined

Default ​
ts
undefined

render()? ​

optional render: (session) => void

Optional custom modal renderer. Leave undefined for default edition modal

Parameters ​
session ​

NodeEditSession

Returns ​

void

Default ​
ts
undefined