ResizingToolsPluginOptions
Options for the resizing tool plugin.
Extends
Extended by
Properties
borderHandleSize?
optionalborderHandleSize:number
Size of handles when using "border" resize. Defaults to 6 pixels.
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.
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
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
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.
handleOffset?
optionalhandleOffset:number
How much to offset the resize frame and handles from the bounds of the shape. Defaults to 5 pixels.
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
handleShape?
optionalhandleShape:"circle"|"rectangle"
Shape of resize handles. Defaults to circle.
handleSize?
optionalhandleSize:number
Width/height to use for handles. Defaults to 20 pixels.
heightAttribute?
optionalheightAttribute:string
Attribute to use for vertex height - defaults to 'height'
ignoreGrid?
optionalignoreGrid:boolean
Defaults to false, meaning size changes conform to an underlying grid, if present
leftAttribute?
optionalleftAttribute:string
Attribute to use for vertex left position - defaults to 'left'
minimumHeight?
optionalminimumHeight:number
Minimum height the user can shrink a vertex to. Defaults to 30.
minimumWidth?
optionalminimumWidth:number
Minimum width the user can shrink a vertex to. Defaults to 30.
modelUpdater?
optionalmodelUpdater:ResizingToolsModelUpdater
Optional function that can inject extra model updates each time a vertex is resized.
onDemand?
optionalonDemand:boolean
Defaults to false, meaning the resizing tool plugin switches on whenever a new vertex is selected.
onEdit()?
optionalonEdit: (o,surface,toolkit) =>any
Optional callback invoked after an edit has occurred
Parameters
o
surface
toolkit
Returns
any
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
resizeMethod?
optionalresizeMethod:ResizingToolsResizeMethod
Method to use for resize - handles on the corners, or borders. Defaults to handles.
resizeX?
optionalresizeX:boolean
Whether or not to support resize in the X axis. Defaults to true.
resizeY?
optionalresizeY:boolean
Whether or not to support resize in the Y axis. Defaults to true.
rotatable?
optionalrotatable:boolean
Whether or not to support rotation on all elements.. Defaults to false.
rotateHandleSize?
optionalrotateHandleSize:number
Size of the rotate handle. Defaults to 16 pixels.
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.
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.
topAttribute?
optionaltopAttribute:string
Attribute to use for vertex top position - defaults to 'top'
widthAttribute?
optionalwidthAttribute:string
Attribute to use for vertex width - defaults to 'width'