DiagramToolsPluginOptions
Options for the diagram tools plugin
Extends
Properties
allowClone?
optionalallowClone:boolean
Whether or not to allow clone of vertices. Defaults to true; is overriden by any canClone function passed in.
allowDelete?
optionalallowDelete:boolean
Whether or not to allow delete of vertices. Defaults to true; is overriden by any canDelete function passed in.
allowLink?
optionalallowLink:boolean
Whether or not to show a handle from which a user can drag a link to other vertices. Defaults to true; is overriden by any canShowLinkButton function passed in.
borderHandleSize?
optionalborderHandleSize:number
Size of handles when using "border" resize. Defaults to 6 pixels.
Inherited from
ResizingToolsPluginOptions.borderHandleSize
bordersVisible?
optionalbordersVisible:boolean
When resizeMethod is "borders", set this to make the borders visible. Internally this just sets a CSS class on the draw skeleton's parent DOM element, and the appearance of the borders is then controlled via CSS.
Inherited from
ResizingToolsPluginOptions.bordersVisible
buttonSize?
optionalbuttonSize:number
width/height of buttons. Defaults to 15 pixels.
canClone()?
optionalcanClone: (v,el) =>boolean
A function that you can provide to instruct the plugin whether or not to show a clone button. The return value of this function overrides the setting of allowClone.
Parameters
v
el
Returns
boolean
canDelete()?
optionalcanDelete: (v,el) =>boolean
A function that you can provide to instruct the plugin whether or not to show a delete button. The return value of this function overrides the setting of allowDelete.
Parameters
v
el
Returns
boolean
canResizeFilter()?
optionalcanResizeFilter: (v,el) =>boolean
Optional function that can decide on whether or not the given vertex should be resizable
Parameters
v
el
Returns
boolean
Inherited from
ResizingToolsPluginOptions.canResizeFilter
canRotateFilter()?
optionalcanRotateFilter: (v,el) =>boolean
Optional function that can decide on whether or not the given vertex should be rotatable
Parameters
v
el
Returns
boolean
Inherited from
ResizingToolsPluginOptions.canRotateFilter
canShowLinkButton()?
optionalcanShowLinkButton: (v,el) =>boolean
A function that you can provide to instruct the plugin whether or not to show a link handle. The return value of this function overrides the setting of allowLink.
Parameters
v
el
Returns
boolean
constrainGroups?
optionalconstrainGroups:boolean
Defaults to true, meaning groups will not be shrunk to the point that one or more of their child vertices is no longer visible.
Inherited from
ResizingToolsPluginOptions.constrainGroups
handleOffset?
optionalhandleOffset:number
How much to offset the resize frame and handles from the bounds of the shape. Defaults to 5 pixels.
Inherited from
ResizingToolsPluginOptions.handleOffset
handlerFactory?
optionalhandlerFactory:ResizingToolsHandlerFactory
Optional factory that can return a resize handler for some given vertex. You can use this to override the default behaviour for any vertex you choose
Param
Inherited from
ResizingToolsPluginOptions.handlerFactory
handleShape?
optionalhandleShape:"circle"|"rectangle"
Shape of resize handles. Defaults to circle.
Inherited from
ResizingToolsPluginOptions.handleShape
handleSize?
optionalhandleSize:number
Width/height to use for handles. Defaults to 20 pixels.
Inherited from
ResizingToolsPluginOptions.handleSize
heightAttribute?
optionalheightAttribute:string
Attribute to use for vertex height - defaults to 'height'
Inherited from
ResizingToolsPluginOptions.heightAttribute
ignoreGrid?
optionalignoreGrid:boolean
Defaults to false, meaning size changes conform to an underlying grid, if present
Inherited from
ResizingToolsPluginOptions.ignoreGrid
leftAttribute?
optionalleftAttribute:string
Attribute to use for vertex left position - defaults to 'left'
Inherited from
ResizingToolsPluginOptions.leftAttribute
minimumHeight?
optionalminimumHeight:number
Minimum height the user can shrink a vertex to. Defaults to 30.
Inherited from
ResizingToolsPluginOptions.minimumHeight
minimumWidth?
optionalminimumWidth:number
Minimum width the user can shrink a vertex to. Defaults to 30.
Inherited from
ResizingToolsPluginOptions.minimumWidth
modelUpdater?
optionalmodelUpdater:ResizingToolsModelUpdater
Optional function that can inject extra model updates each time a vertex is resized.
Inherited from
ResizingToolsPluginOptions.modelUpdater
onDemand?
optionalonDemand:boolean
Defaults to false, meaning the resizing tool plugin switches on whenever a new vertex is selected.
Inherited from
ResizingToolsPluginOptions.onDemand
onEdit()?
optionalonEdit: (o,surface,toolkit) =>any
Optional callback invoked after an edit has occurred
Parameters
o
surface
toolkit
Returns
any
Inherited from
ResizingToolsPluginOptions.onEdit
payloadGenerator()?
optionalpayloadGenerator: (v,p) =>ObjectData
Optional function to invoke when a resize has occurred. The values the resizing plugin wants to write for the vertex are merged on top of the value returned from this function, and the combined payload is written as an update to the vertex in the data model. This exists for internal use mostly but there's no harm in it being exposed for your enjoyment.
Parameters
v
p
Returns
Inherited from
ResizingToolsPluginOptions.payloadGenerator
resizeMethod?
optionalresizeMethod:ResizingToolsResizeMethod
Method to use for resize - handles on the corners, or borders. Defaults to handles.
Inherited from
ResizingToolsPluginOptions.resizeMethod
resizeX?
optionalresizeX:boolean
Whether or not to support resize in the X axis. Defaults to true.
Inherited from
ResizingToolsPluginOptions.resizeX
resizeY?
optionalresizeY:boolean
Whether or not to support resize in the Y axis. Defaults to true.
Inherited from
ResizingToolsPluginOptions.resizeY
rotatable?
optionalrotatable:boolean
Whether or not to support rotation on all elements.. Defaults to false.
Inherited from
ResizingToolsPluginOptions.rotatable
rotateHandleSize?
optionalrotateHandleSize:number
Size of the rotate handle. Defaults to 16 pixels.
Inherited from
ResizingToolsPluginOptions.rotateHandleSize
rotateLeaderLength?
optionalrotateLeaderLength:number
Length of the leader line to the resize handle when using the resizing tools in an SVG container. Defaults to 30 pixels.
Inherited from
ResizingToolsPluginOptions.rotateLeaderLength
rotationStops?
optionalrotationStops:number
Optional number of stops to use when rotating. If not provided vertices can be rotated to any angle. If provided, the value is divided into 360 and the result is the angle between each stop. For example, a value of 12 means each stop is 30 degrees.
Inherited from
ResizingToolsPluginOptions.rotationStops
shouldDeleteGroupMembers()?
optionalshouldDeleteGroupMembers: (g,el) =>boolean
A function that you can provide to instruct the plugin whether or not, when removing a group, to also remove its child members. You need to return boolean true from this method in order for group members to be deleted.
Parameters
g
el
Returns
boolean
topAttribute?
optionaltopAttribute:string
Attribute to use for vertex top position - defaults to 'top'
Inherited from
ResizingToolsPluginOptions.topAttribute
widthAttribute?
optionalwidthAttribute:string
Attribute to use for vertex width - defaults to 'width'