Ir al contenido

ReactDiagramProps

Defined in: react/index.tsx:248

optional divClassName?: string

Defined in: react/index.tsx:279


initDiagram: () => Diagram

Defined in: react/index.tsx:256

Called once, on mount, to construct the Diagram (templates, tools, listeners — whatever the app needs) before it has a div: <ReactDiagram> attaches it afterward via diagram.div =. Matches gojs-react’s ReactDiagram factory shape, so existing initDiagram functions port by only changing the import.

Diagram


optional linkDataArray?: LinkData[]

Defined in: react/index.tsx:260

GoJS-compatible: initial/updated link data.


optional modelData?: Record<string, unknown>

Defined in: react/index.tsx:266

Accepted for gojs-react prop-shape compatibility, but inert: graphojs’s Model has no modelData (shared, model-wide data) concept to apply it to.


optional nodeDataArray?: NodeData[]

Defined in: react/index.tsx:258

GoJS-compatible: initial/updated node data.


optional onModelChange?: (event) => void

Defined in: react/index.tsx:278

GoJS-compatible: called whenever the diagram’s model changes.

ChangedEvent

void


optional skipsDiagramUpdate?: boolean

Defined in: react/index.tsx:276

When true, nodeDataArray/linkDataArray prop changes are NOT synced to the model automatically — the app manages the model itself (e.g. via transactions on the instance from ref.getDiagram()), matching gojs-react’s advanced/incremental-update mode. When false/omitted (the default), changing these props replaces diagram.model with a freshly-built one — a full resync, not gojs-react’s finer-grained incremental IncrementalData diff.


optional style?: CSSProperties

Defined in: react/index.tsx:280