Class: SharedCanvasState
Defined in: diagram/sharedCanvasState.ts:70
Stores common state and settings for multiple canvases.
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
| ( | Default element template resolver to use as a fallback (returns a default template for any element). | |
| Default layout algorithm function to use if it's not specified explicitly. | ||
| ( | Default link template resolver to use as a fallback (returns a default template for any link). | |
| Event for the shared canvas state. | ||
|
| A strategy to rename diagram links (change labels). |
Accessors
highlighter
Get Signature
get highlighter():
undefined|CellHighlighter
Defined in: diagram/sharedCanvasState.ts:181
Returns active highlight for the diagram cells.
Experimental: this feature will likely change in the future.
Returns
undefined | CellHighlighter
Methods
findAllCanvases()
findAllCanvases():
CanvasApi[]
Defined in: diagram/sharedCanvasState.ts:124
Returns all canvases that use this shared state.
Returns
findAnyCanvas()
findAnyCanvas():
undefined|CanvasApi
Defined in: diagram/sharedCanvasState.ts:133
Returns any canvas that uses this shared state or undefined if none found.
Returns
undefined | CanvasApi
hasHandlerForNextDropOnPaper()
hasHandlerForNextDropOnPaper():
boolean
Defined in: diagram/sharedCanvasState.ts:153
Returns true if there is a previously set drop handler on a canvas,
otherwise false.
Experimental: this feature will likely change in the future.
Returns
boolean
setHandlerForNextDropOnPaper()
setHandlerForNextDropOnPaper(
handler):void
Defined in: diagram/sharedCanvasState.ts:143
Sets the handler for the next drop event from drag-and-drop operation on a canvas.
Experimental: this feature will likely change in the future.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
void
setHighlighter()
setHighlighter(
value):void
Defined in: diagram/sharedCanvasState.ts:187
Sets or removes an active highlight for the diagram cells.
Experimental: this feature will likely change in the future.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
void
tryHandleDropOnPaper()
tryHandleDropOnPaper(
e):boolean
Defined in: diagram/sharedCanvasState.ts:165
Tries to run previously set drop handler on a canvas, then removes the handler if it was set.
Experimental: this feature will likely change in the future.
Parameters
| Parameter | Type |
|---|---|
|
Returns
boolean
true if a handler was set, otherwise false