Ir al contenido

DiagramOptions

Defined in: diagram/Diagram.ts:73

optional accessibilityMessages?: Partial<AccessibilityMessages>

Defined in: diagram/Diagram.ts:131

Accessibility message formatters (aria-label, live-region announcements). Defaults to English; override to localize. See AccessibilityMessages.


optional allowCopy?: boolean

Defined in: diagram/Diagram.ts:109

GoJS-compatible: Whether parts can be copied. Default: true


optional allowDelete?: boolean

Defined in: diagram/Diagram.ts:111

GoJS-compatible: Whether parts can be deleted. Default: true


optional allowDrop?: boolean

Defined in: diagram/Diagram.ts:113

GoJS-compatible: Whether parts can be dropped. Default: true


optional allowHorizontalScroll?: boolean

Defined in: diagram/Diagram.ts:117

GoJS-compatible: Whether horizontal scrolling is allowed. Default: true


optional allowMove?: boolean

Defined in: diagram/Diagram.ts:107

GoJS-compatible: Whether parts can be moved. Default: true


optional allowVerticalScroll?: boolean

Defined in: diagram/Diagram.ts:119

GoJS-compatible: Whether vertical scrolling is allowed. Default: true


optional allowZoom?: boolean

Defined in: diagram/Diagram.ts:115

GoJS-compatible: Whether zooming is allowed. Default: true


optional backgroundColor?: string

Defined in: diagram/Diagram.ts:101

Background color. Default: ‘#ffffff’


optional div?: HTMLDivElement | null

Defined in: diagram/Diagram.ts:82

The container element for the diagram. Optional — a Diagram constructed without one starts detached (matching div = null); assign .div afterward to attach it. Lets frameworks that build the Diagram before a host element exists yet (e.g. a gojs-react-style initDiagram: () => Diagram factory, called before the ref’s element mounts) construct it up front and attach it once the element is ready.


optional gridSize?: number

Defined in: diagram/Diagram.ts:90

Grid size in pixels. Default: 20


optional initialContentAlignment?: Spot

Defined in: diagram/Diagram.ts:123

GoJS-compatible: Initial content alignment spot.


optional initialContentAlignmentOffset?: object

Defined in: diagram/Diagram.ts:125

GoJS-compatible: Content alignment offset.

x: number

y: number


optional initialScale?: number

Defined in: diagram/Diagram.ts:84

Initial scale. Default: 1


optional isEnabled?: boolean

Defined in: diagram/Diagram.ts:105

GoJS-compatible: Whether the diagram is enabled. Default: true


optional isReadOnly?: boolean

Defined in: diagram/Diagram.ts:103

GoJS-compatible: Whether the diagram can be modified. Default: true


optional maxScale?: number

Defined in: diagram/Diagram.ts:88

Maximum scale for zoom. Default: 10


optional minScale?: number

Defined in: diagram/Diagram.ts:86

Minimum scale for zoom. Default: 0.1


optional scrollMode?: "document" | "infinite"

Defined in: diagram/Diagram.ts:121

GoJS-compatible: Scroll mode: ‘document’ or ‘infinite’. Default: ‘document’


optional selectionStyle?: Partial<SelectionStyle>

Defined in: diagram/Diagram.ts:138

Colors used for selection highlights and the keyboard focus cursor. Defaults to a high-contrast palette when the OS requests prefers-contrast: more or forced-colors: active, otherwise to defaultSelectionStyle. Override any subset to customize.


optional showGrid?: boolean

Defined in: diagram/Diagram.ts:97

Show grid background. Default: false, matching real GoJS — its own Diagram.grid Panel exists by default but starts visible: false; you opt in explicitly (myDiagram.grid.visible = true, or here, showGrid: true).


optional snapToGrid?: boolean

Defined in: diagram/Diagram.ts:99

Snap parts to the grid when moving. Default: false