Skip to content

pivotick v3.0.0


pivotick / InterractionCallbacks / EdgeCreateDecision

Type Alias: EdgeCreateDecision ​

EdgeCreateDecision = boolean | { accept: boolean; data?: EdgeData; directed?: boolean | null; id?: string; persisted?: boolean; style?: PartialEdgeFullStyle; }

Defined in: interfaces/InterractionCallbacks.ts:427

The decision returned by InterractionCallbacks.onBeforeEdgeCreate.

true accepts with defaults, false vetoes. The object form accepts (when accept is true) and lets the consumer supply the new edge's data/style/id/ direction. The data/style/id/directed fields apply to edges only and are ignored for note-links.

Type Declaration ​

boolean

{ accept: boolean; data?: EdgeData; directed?: boolean | null; id?: string; persisted?: boolean; style?: PartialEdgeFullStyle; }

accept ​

accept: boolean

data? ​

optional data: EdgeData

directed? ​

optional directed: boolean | null

id? ​

optional id: string

persisted? ​

optional persisted: boolean

The consumer wrote this creation through to its own backend — only the consumer can know a write happened, so only the consumer can declare it. The history row is marked saved and still reverses: undo takes the element off the canvas, the backend keeps its copy, and the menu says so before the click.

style? ​

optional style: PartialEdgeFullStyle