Optional
allowDefaults to false. When true, users can click on the canvas to "draw" a new element, and that element's size will use the default
Optional
autoWhen true (which is the default) the lasso exits after a group has been drawn
Optional
defaultOptional default size for groups, used when allowClickToAdd
is set to true. Defaults to {w:250, h:250}
Optional
defaultOptional default size for nodes, used when allowClickToAdd
is set to true. Defaults to {w:80, h:80}
Optional
groupThe type identifier for new groups. If you have also provided a typeGenerator this will be ignored. If you have not provided a typeGenerator but you have provided a nodeType, this will be ignored.
Optional
invertDefaults to false, meaning the lasso is drawn as a rectangle. If true, the lasso is drawn as a set of masks, with the lasso area drawn as a "hole" in the masks.
Optional
lassoOptional extra class(es) to set on the lasso used for drawing.
Optional
minThe minimum size for vertices. If your user draws a vertex smaller than this it will be discarded. Defaults to {w:50, h:50}
Optional
nodeThe type identifier for new nodes. If you have also provided a typeGenerator this will be ignored.
Optional
typeOptional function that will be invoked when a new drag commences, and which is responsible for returning the type of object to add (Node or Group), as well as that object's own type, and, optionally, an initial payload for the new object.
Optional
vertexA function that will be invoked at the start of a drawing operation, and can return an element to draw into the lasso. This is an optional function; if you don't provide it JsPlumb will draw a basic SVG rectangle to indicate the drawing area.
Optional
vertexA function that is invoked during mouse drag, to be used in conjunction with vertexPreviewGenerator
. This function gives you
a hook to use to make any changes to your preview element, should you need to. This is optional.
Options for the vertex drawing plugin