pivotick / InterractionCallbacks / EdgeCreateContext
Interface: EdgeCreateContext
Defined in: interfaces/InterractionCallbacks.ts:392
Context passed to InterractionCallbacks.onBeforeEdgeCreate.
Properties
kind
kind:
"edge"|"note-link"
Defined in: interfaces/InterractionCallbacks.ts:400
'edge' for a node→node edge, 'note-link' for a note→node attachment.
origin
origin:
EdgeCreateOrigin
Defined in: interfaces/InterractionCallbacks.ts:398
Whether the gesture was click- or drag-to-connect.
promptData()
promptData: (
options) =>Promise<EdgeData|null>
Defined in: interfaces/InterractionCallbacks.ts:416
Prompt the user for a whole data payload via a modal — a declarative form (EdgePromptDataOptions.fields) or custom HTML (EdgePromptDataOptions.render + getValues). Resolves to the collected object, or null if the user cancelled. Feed it straight into the decision — e.g. return { accept: true, data: values }. Modal only (no inline variant).
Parameters
options
Returns
Promise<EdgeData | null>
promptLabel()
promptLabel: (
options?) =>Promise<string|null>
Defined in: interfaces/InterractionCallbacks.ts:408
Prompt the user for a label while the connect gesture is still pending, using either a floating inline input or a modal (per EdgeLabelPromptOptions.mode). Resolves to the entered string, or null if the user cancelled (Esc / closed). The shadow-edge preview stays up while it is open. Typically fed back into the returned decision's data — e.g. return { accept: true, data: { label } }.
Parameters
options?
Returns
Promise<string | null>
source
Defined in: interfaces/InterractionCallbacks.ts:394
The source of the connection — a Node for an edge, a Note for a note-link.
target
target:
Node
Defined in: interfaces/InterractionCallbacks.ts:396
The resolved target node.