DiagramOptions
Defined in: diagram/Diagram.ts:73
Properties
Sección titulada «Properties»accessibilityMessages?
Sección titulada «accessibilityMessages?»
optionalaccessibilityMessages?:Partial<AccessibilityMessages>
Defined in: diagram/Diagram.ts:131
Accessibility message formatters (aria-label, live-region announcements). Defaults to English; override to localize. See AccessibilityMessages.
allowCopy?
Sección titulada «allowCopy?»
optionalallowCopy?:boolean
Defined in: diagram/Diagram.ts:109
GoJS-compatible: Whether parts can be copied. Default: true
allowDelete?
Sección titulada «allowDelete?»
optionalallowDelete?:boolean
Defined in: diagram/Diagram.ts:111
GoJS-compatible: Whether parts can be deleted. Default: true
allowDrop?
Sección titulada «allowDrop?»
optionalallowDrop?:boolean
Defined in: diagram/Diagram.ts:113
GoJS-compatible: Whether parts can be dropped. Default: true
allowHorizontalScroll?
Sección titulada «allowHorizontalScroll?»
optionalallowHorizontalScroll?:boolean
Defined in: diagram/Diagram.ts:117
GoJS-compatible: Whether horizontal scrolling is allowed. Default: true
allowMove?
Sección titulada «allowMove?»
optionalallowMove?:boolean
Defined in: diagram/Diagram.ts:107
GoJS-compatible: Whether parts can be moved. Default: true
allowVerticalScroll?
Sección titulada «allowVerticalScroll?»
optionalallowVerticalScroll?:boolean
Defined in: diagram/Diagram.ts:119
GoJS-compatible: Whether vertical scrolling is allowed. Default: true
allowZoom?
Sección titulada «allowZoom?»
optionalallowZoom?:boolean
Defined in: diagram/Diagram.ts:115
GoJS-compatible: Whether zooming is allowed. Default: true
backgroundColor?
Sección titulada «backgroundColor?»
optionalbackgroundColor?:string
Defined in: diagram/Diagram.ts:101
Background color. Default: ‘#ffffff’
optionaldiv?: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.
gridSize?
Sección titulada «gridSize?»
optionalgridSize?:number
Defined in: diagram/Diagram.ts:90
Grid size in pixels. Default: 20
initialContentAlignment?
Sección titulada «initialContentAlignment?»
optionalinitialContentAlignment?:Spot
Defined in: diagram/Diagram.ts:123
GoJS-compatible: Initial content alignment spot.
initialContentAlignmentOffset?
Sección titulada «initialContentAlignmentOffset?»
optionalinitialContentAlignmentOffset?:object
Defined in: diagram/Diagram.ts:125
GoJS-compatible: Content alignment offset.
x:
number
y:
number
initialScale?
Sección titulada «initialScale?»
optionalinitialScale?:number
Defined in: diagram/Diagram.ts:84
Initial scale. Default: 1
isEnabled?
Sección titulada «isEnabled?»
optionalisEnabled?:boolean
Defined in: diagram/Diagram.ts:105
GoJS-compatible: Whether the diagram is enabled. Default: true
isReadOnly?
Sección titulada «isReadOnly?»
optionalisReadOnly?:boolean
Defined in: diagram/Diagram.ts:103
GoJS-compatible: Whether the diagram can be modified. Default: true
maxScale?
Sección titulada «maxScale?»
optionalmaxScale?:number
Defined in: diagram/Diagram.ts:88
Maximum scale for zoom. Default: 10
minScale?
Sección titulada «minScale?»
optionalminScale?:number
Defined in: diagram/Diagram.ts:86
Minimum scale for zoom. Default: 0.1
scrollMode?
Sección titulada «scrollMode?»
optionalscrollMode?:"document"|"infinite"
Defined in: diagram/Diagram.ts:121
GoJS-compatible: Scroll mode: ‘document’ or ‘infinite’. Default: ‘document’
selectionStyle?
Sección titulada «selectionStyle?»
optionalselectionStyle?: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.
showGrid?
Sección titulada «showGrid?»
optionalshowGrid?: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).
snapToGrid?
Sección titulada «snapToGrid?»
optionalsnapToGrid?:boolean
Defined in: diagram/Diagram.ts:99
Snap parts to the grid when moving. Default: false