Skip to main content

Home > @jsplumbtoolkit/core

core package

Classes

ClassDescription
AbsoluteBackedLayoutBase class for layouts that want to be backed with an absolute layout, ie. if for a given vertex there is positioning data available in the dataset, that positioning data should be used instead of the layout's computed position.
AbsoluteLayoutThis layout uses left and top positions in your data model to position elements, unless you provide a locationFunction in its options.
AbstractLayoutBase class for all layouts.
AddGroupMemberAction
AutoSaver
Base
CatchAllEventHandler
Cluster
Edge
EmptyLayoutA layout that has no opinions whatsoever about where nodes should be placed. Everything is placed at [0,0] and assumed to have a width and height of 0. This layout is a placeholder.
Graph
Group
GroupCollapseAction
GroupExpandAction
GroupRemoveAction
JsPlumbToolkitCore Toolkit functionality. This class is extended by renderer specific subclasses.
Magnetizer

Offers a means to apply 'magnetization' to some list of elements, pushing them apart so that they do not overlap. For a given run of the magnetizer there is the concept of a "focus" rectangle. The center of this rectangle is the point from which magnetization occurs, with elements being pushed out radially from this point. There are a few different scenarios:

- execute magnetizer with a given origin, and affect all elements - execute magnetizer on all elements, having first computed the center of them - execute magnetizer using a specific element as the focus

Node
PathModels the path between two Nodes/Ports, which consists of a series of [Group/Node/Port, Edge] pairs.
Port
PortAddAction
PortRemoveAction
RemoveGroupMemberAction
SelectionA selection is a group of vertices and edges, upon which you can perform bulk operations.
TerminusAddAction
TerminusRemoveAction
Vertex

Functions

FunctionDescription
calculateSpacingAdjustment(r1, r2)
data(inObj, path, value)Extract a value from, or set a value into, an object. This static method can be used outside of Knockle.
defaultIdFunction(obj)
djikstra(params)
exportData(type, toolkit, parameters)Internal method that handles data export, by looking for an exporter registered for the given type.
floydWarshall(params)
isEdge(obj)
isGroup(obj)
isGroupVertex(v)
isNestedGroup(obj)
isNode(obj)
isNodeInsideAGroup(obj)
isNodeVertex(v)
isPort(obj)
isPortVertex(v)
parse(type, source, toolkit, parameters)
partition(l, partitioner)Partitions a list into two lists - one for which the supplied partitioner returns true (the left list), and the other, the right list, for which the supplied partitioner does not return true.
registerExporter(name, p)
registerParser(name, p)
resolveNode(v)For the given vertex, resolves the node/group it pertains to. If the vertex is already a node/group, it is returned. Otherwise, if it is a port, the parent of the port is returned.
resolvePortId(v)For the given vertex, resolve its port id. If it is not a port, null is returned. If it is a port, its id is returned (without the parent vertex's id prefixed to it)

Interfaces

InterfaceDescription
AbsoluteBackedLayoutParametersParameters for a layout that extends AbsoluteBackedLayout
AbstractEdgeTerminusBase class for objects in a Graph that can act as the terminus for an Edge.
AddEdgeOptions
AutoSaveOptions
ConnectOptionsOptions for a connect call.
DataLoadOptions
DataSource
Deletion
DjikstraOptions
EdgeAddedParams
EdgeOptions
EdgePathEditedParams
EdgePathRestoredParams
EdgeRemovedParams
EdgeSelectionParams
EdgeSourceChangedParams
EdgeTargetChangedParams
EdgeUpdatedParams
EdgeVertexChangedParams
ExportOptionsOptions for data export.
FilterableDatasetExtension of dataset that offers operation to perform operations on the contents, and to filter the contents.
FloydWarshallOptions
FloydWarshallResult
GraphObject
GraphOptions
GroupAddedParams
GroupDefinitionA group definition in a view.
GroupDeletion
GroupMemberAddedParams
GroupMemberRemovedParams
GroupRemovedParams
JsPlumbToolkitOptionsConstructor options for a Toolkit instance.
LayoutParametersBase interface for layout parameters. All layout parameter interfaces extend this.
LoadOptionsOptions for loading data.
MagnetizerOptions
MagnetizerRunOptions
NodeAddedParams
NodeDefinitionA node definition in a view.
NodeDeletion
NodeRemovedParams
ObjectInfo
PathOptionsPath specification.
PortAddedParams
PortDefinitionA port definition in a view.
PortRemovedParams
PortUpdatedParams
RendererAddedParams
SaveOptionsOptions for a save via ajax.
SelectionOptions
ShortestPathComponent
ShortestPathResult
ToolkitRenderer
UndoRedoUpdateParams
VertexDefinitionBase class for node, group and port definitions. This interface is shared by the model and the view.
VertexMovedParams
VertexUpdatedParams

Variables

VariableDescription
APPEND_TO_CURRENTDirective to append the operations in the new transaction to the current transaction, if a new one has been opened before the current one has been closed.
COMMIT_CURRENTDirective to commit the current transaction if a new one has been opened before the current one has been closed.
EVENT_DATA_APPEND_END
EVENT_DATA_APPEND_START
EVENT_DATA_LOAD_END
EVENT_DATA_LOAD_START
EVENT_DATA_UPDATED
EVENT_DESELECT
EVENT_DESTROY
EVENT_EDGE_ADDED
EVENT_EDGE_PATH_EDITED
EVENT_EDGE_PATH_RESTORED
EVENT_EDGE_REMOVED
EVENT_EDGE_SOURCE_CHANGED
EVENT_EDGE_TARGET_CHANGED
EVENT_EDGE_TYPE_CHANGED
EVENT_EDGE_UPDATED
EVENT_GRAPH_CHANGED
EVENT_GRAPH_CLEAR_START
EVENT_GRAPH_CLEARED
EVENT_GROUP_ADDED
EVENT_GROUP_MEMBER_ADDED
EVENT_GROUP_MEMBER_REMOVED
EVENT_GROUP_MOVE_END
EVENT_GROUP_MOVE_START
EVENT_GROUP_MOVE
EVENT_GROUP_REMOVED
EVENT_GROUP_TYPE_CHANGED
EVENT_GROUP_UPDATED
EVENT_NODE_ADDED
EVENT_NODE_MOVE_END
EVENT_NODE_MOVE_START
EVENT_NODE_MOVE
EVENT_NODE_REMOVED
EVENT_NODE_TYPE_CHANGED
EVENT_NODE_UPDATED
EVENT_PORT_ADDED
EVENT_PORT_REMOVED
EVENT_PORT_RENAMED
EVENT_PORT_TYPE_CHANGED
EVENT_PORT_UPDATED
EVENT_RENDERER_ADDED
EVENT_SELECT
EVENT_SELECTION_CLEARED
EVENT_UNDOREDO_UPDATE
HIERARCHICAL_JSON_DATATYPE
JSON_DATATYPE
Layouts
Parameters
ROLLBACK_CURRENTDirective to rollback the current transaction if a new one has been opened before the current one has been closed.
Storage
UPDATE_NODE_REASON_ADD_NEW_PORT
UPDATE_NODE_REASON_ADD_PORT
UPDATE_NODE_REASON_MOVED
UPDATE_NODE_REASON_REMOVE_PORT
UPDATE_NODE_REASON_UPDATE_PORT

Type Aliases

Type AliasDescription
BeforeConnectInterceptorDefinition of a function to use as a beforeConnect interceptor.
BeforeDetachInterceptorA function to run before the given edge is detached from the given source vertex. If this method returns false, the detach will be aborted.
BeforeMoveConnectionInterceptorA 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.
BeforeStartConnectInterceptorA 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.
BeforeStartDetachInterceptorA 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.
Exporter
FilterFunction
IdFunction
LocationFunctionDefines a function that, given some vertex, can provide the x/y location of the vertex on the canvas. During a group layout, the second argument will contain the group that is being laid out, but when running the layout for the main canvas, parentGroup will not be provided.
MagnetizerConstrainFunction
ObjectData
ObjectFactoryDefinition of a function that can act as a factory for model objects.
Parser
TransactionCleanupActionDefines the available actions in response to a new transaction being opened when one is currently open.
TypeFunction
VertexUpdatedReason