Optional
autoWhether or not to automatically save the data when an update to a model object occurs. If you set this then
you need to provide saveUrl
or autoSaveHandler
.
Optional
autoA debounce timeout to use when the autoSave
functionality is turned on. You can use this to reduce the number
of calls to your auto save endpoint.
Optional
autoA handler for the auto save operation. You need to provide this or saveUrl
if you set autoSave:true
.
Optional
autoOptional type to use for auto save. Defaults to "json", the default input/output format the Toolkit uses. If you have registered your own exporter you can use this parameter to instruct the Toolkit to auto save via that exporter.
Optional
beforeDefinition of a function to use as a beforeConnect interceptor.
The source vertex for the new edge
The target vertex for the new edge
If true, the new edge came from user activity, with a pointer device or touch input. This will be
false whenever the edge is added programmatically, either during a data load or via the addEdge
method of the Toolkit.
Optional
beforeA function to run before the given edge is detached from the given source vertex. If this method returns false, the detach will be aborted.
Edge's source.
Candidate target for the edge
The edge that is being detached.
Optional
beforeA function to run before an edge of the given type is relocated from its current source or target to a new source or target. Returning false from this method will abort the move.
Candidate source. May be the edge's current source, or may be a new source.
Candidate target. May be the edge's current target, or may be a new target.
The edge that is being moved.
Optional
beforeA function to run before an edge of the given type is dragged from the given source. Returning false from this method will abort the connection.
Optional
beforeA function to run before the given edge is detached from the given source vertex. If this method returns false, the
detach will be aborted. The difference between this and beforeDetach
is that this method is fired as soon as a user
tries to detach an edge from an endpoint in the UI, whereas beforeDetach
allows a user to detach the edge in the UI.
Optional
dataData to load directly after Toolkit has been created.
Optional
defaultThe default cost for an edge. Default value is 1.
Optional
defaultWhether edges are directed by default. The default value for this is true
- edges are directed by default.
Optional
doSets whether or not the Toolkit manipulates the original dataset when updates are made. Defaults to true.
setDoNotUpdateOriginalData
Optional
edgeA function to use to determine the ID of some edge from its data. By default the Toolkit uses the value of the object's id
property.
Optional
edgeA function to use to determine the type of some edge from its data object. By default the Toolkit uses the value of the object's type
property.
Optional
edgeThe name of the property that identifies a given edge's type
. By default this is the type
property. If you do not set this but
you do set typeProperty
, that value will be used.
Optional
idA function to use to determine the ID of some data object. By default the Toolkit uses the value of the object's id
property.
Optional
maxThe maximum number of edges that can be selected at any one time. Defaults to Infinity.
Optional
maxThe maximum number of groups that can be selected at any one time. Defaults to Infinity.
Optional
maxThe maximum number of nodes that can be selected at any one time. Defaults to Infinity.
Optional
modelThe name of the property inside a vertex's data that identifies its height. Defaults to height
.
Optional
modelThe name of the property inside a vertex's data that identifies its location in the y axis. Defaults to top
.
Optional
modelThe name of the property inside a vertex's data that identifies its location in the x axis. Defaults to left
.
Optional
modelThe name of the property inside a vertex's data that identifies its width. Defaults to width
.
Optional
onA function to run after the auto save has run.
Optional
onA function to call when an auto save operation experienced an error.
Optional
onA function to call when an auto save operation was successful.
Optional
onA function to run before auto save runs.
Optional
portThe name of a property that will exist inside the backing data for nodes/group, and which represents a list of ports pertaining
to that node/group. When a node/group is rendered, if this property is set, the Toolkit will consider the value of this
property to be a list of port data object. So this property's value should be of type Array<ObjectData>
Optional
portA function to use to extract an array of ports from the data representing some node/group. Whenever a node/group is rendered, the Toolkit
will use this method, if provided, to determine a list of ports for that node/group. If you use this you probably also
want to define a portUpdater
. Note that if you provide the portDataProperty
then you do not need to set this.
Optional
portA function to use to determine the ID of some port from its data. By default the Toolkit uses the value of the object's id
property.
Optional
portThe name of a property inside of each port's data that can be used to order the ports. For instance, you might have
ports that have a rank
property, which is a number. The Toolkit will sort the ports according to the natural ordering
of this property.
Optional
portThe character to use in port identifiers. Defaults to .
, eg. someVertex.somePort.
Optional
portA function to use to determine the type of some port from its data object. By default the Toolkit uses the value of the object's type
property.
Optional
portThe name of the property that identifies a given port's type
. By default this is the type
property. If you do not set this but
you do set typeProperty
, that value will be used.
Optional
portA function to use to update a given node/group's list of ports. Note that if you provide the portDataProperty
then you do not need to set this.
Optional
saveA map of HTTP headers to send along with an auto save request.
Optional
saveURL for auto save endpoint.
Optional
selectionDefines the action taken when appending an object that would take the selection above its limit for the given object type. This can be either Selection.DISCARD_EXISTING (the default) or Selection.DISCARD_NEW.
Optional
selectionOptional mode for the Toolkit's current selection. Defaults to the Selection default - SelectionModes.mixed
.
Optional
typeA function to use to determine the type of some data object. By default the Toolkit uses the value of the object's type
property.
Optional
typeThe name of the property that identifies a given object's type
. By default this is the type
property.
Optional
undoConfiguration for undo/redo
Optional
enabled?: booleanWhether or not undo/redo is enabled. Defaults to true.
Optional
maximumMaximum size of the undo stack. Defaults to 50.
Constructor options for a Toolkit instance.