pivotick / InterractionCallbacks / NodeCreateContext
Interface: NodeCreateContext
Defined in: interfaces/InterractionCallbacks.ts:575
Context passed to InterractionCallbacks.onBeforeNodeCreate.
Properties
origin
origin:
NodeCreateOrigin
Defined in: interfaces/InterractionCallbacks.ts:579
Which affordance initiated the create.
position
position:
object
Defined in: interfaces/InterractionCallbacks.ts:577
Graph-space position the node will be placed at (correct under any zoom/pan).
x
x:
number
y
y:
number
promptData()
promptData: (
options) =>Promise<NodeData|null>
Defined in: interfaces/InterractionCallbacks.ts:586
Prompt the user for the new node's data payload via a modal — a declarative form (PromptDataOptions.fields) or custom HTML (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 }.
Parameters
options
Returns
Promise<NodeData | null>