Concrete instance of JsPlumbToolkit that uses the templates-2 package as its renderer.

Hierarchy (view full)

Methods

  • Adds an Edge to the Graph.

    Parameters

    • params: AddEdgeOptions & {
          addedByMouse?: boolean;
      }

      Options for the new edge

    • Optional source: ToolkitRenderer<any>

      The renderer that was the source of the action. Optional, used internally.

    • Optional doNotFireEvent: boolean

      Optional. Won't fire an event if this is true. For internal use only.

    Returns Edge

    The Edge that was added.

  • Adds a Group by type, running the data generation for the node through the current GroupFactory. This is different from addGroup in that with addGroup you are supplying the final data and your GroupFactory is not called. This method can be called with one, two or three arguments. A single argument is considered to be the new Group's type, and a backing data object will be created with this set, and no callback will occur. If you provide two arguments the second argument may be either the new Group's backing data OR a callback to hit with the newly created Group. With three arguments the second argument is the Group's backing data and the third is a callback to hit with the newly created Group.

    Parameters

    • type: string

      Required. Type of the object to create. type will be passed as the first argument to your group factory.

    • Optional data: ObjectData

      Optional backing data for the Group.

    • Optional continueCallback: Function

      Optional function to call with the newly created Group.

    • Optional abortCallback: Function

      Optional function to call if the group factory aborted

    Returns void

  • Adds a Node by type, running the data generation for the node through the current NodeFactory. This is different from addNode in that with addNode you are supplying the final data and your NodeFactory is not called. This method can be called with one, two or three arguments. A single argument is considered to be the new Node's type, and a backing data object will be created with this set, and no callback will occur. If you provide two arguments the second argument may be either the new Node's backing data OR a callback to hit with the newly created Node. With three arguments the second argument is the Node's backing data and the third is a callback to hit with the newly created Node.

    Parameters

    • type: string

      Required. Type of the object to create. type will be passed as the first argument to your node factory.

    • Optional data: ObjectData

      Optional backing data for the Node.

    • Optional continueCallback: Function

      Optional function to call with the newly created Node.

    • Optional abortCallback: Function

      Optional function to call if the factory aborted the node add.

    Returns void

  • Adds a new Group.

    Parameters

    • data: ObjectData

      Backing data for the Group.

    • Optional eventInfo: any

      Used internally, sometimes, by the Toolkit.

    • Optional doNotFireEvent: boolean

      Internal usage.

    Returns Group

    The Group that was added.

  • Adds a new Port to some Node. This will call the current portFactory to get the data for a new Port.

    Parameters

    • obj: string | Node | Group

      node/group or id of the node/group to add a new Port to.

    • type: string

      Type of Port to add.

    • Optional portData: ObjectData

      Data to pass to the PortFactory.

    • Optional doNotFireEvent: boolean

    Returns void

  • Adds a Node with the given data. If the data is null, the Toolkit creates an empty object and assigns a uuid as the Node's id. If no id can be derived for the given data, the Toolkit creates a uuid and sets it as the data object's 'id' member. This method also calls the current portExtractor function, if one was supplied. Its purpose is to extract any Ports from the data for some given Node.

    Parameters

    • data: ObjectData

      The Node's backing data - from your data model.

    • Optional eventInfo: any

      Optional data member that the Toolkit will pass into any registered event listeners. This can be used by the UI layer, for instance, to track the position on screen of any newly added elements.

    • Optional doNotFireEvent: boolean

    Returns Node

    A Node object. Your original data is available via the data member. The Node's id is available via the id member.

  • Appends the Path from source to target to the current selection. If there is no current selection, obj becomes it. If the Path does not exist, there is no selection.

    Parameters

    • params: {
          edgeFilter?: ((n) => boolean);
          nodeFilter?: ((n) => boolean);
          source: string | Vertex;
          strict?: boolean;
          target: string | Vertex;
      }

      Path params

      • Optional edgeFilter?: ((n) => boolean)
          • (n): boolean
          • Parameters

            • n: Edge

            Returns boolean

      • Optional nodeFilter?: ((n) => boolean)
          • (n): boolean
          • Parameters

            • n: Node

            Returns boolean

      • source: string | Vertex

        ID of source, or source Node/Port

      • Optional strict?: boolean
      • target: string | Vertex

        ID of target, or target Node/Port

    Returns void

  • Adds a Port from existing data to some Node/Group. This is distinct from addNewPort, because in this case the data for the Port already exists.

    Parameters

    • vertex: string | Node | Group

      Node/Group or id of the Node/Group to add the Port to.

    • data: ObjectData

      Data for the Port.

    • Optional doNotFireEvent: boolean

    Returns Port

    The port that was added.

  • Adds a Node/Group to a Group.

    Parameters

    • node: string | Node | Group | ObjectData

      Node to add

    • group: string | Group | ObjectData

      Group to add the Node/Group to

    • Optional sourceGroup: Group

      Optional Group the Node previously belonged to.

    • Optional position: PointXY

      Optional previous position of the Node in sourceGroup.

    • Optional source: ToolkitRenderer<any>

      For internal use. Identifies the renderer that instigated this model change. This renderer will not subsequently respond to the model change, since it already knows about it and its UI has been changed accordingly already.

    Returns boolean

    True if added, false otherwise.

  • Appends obj to the current selection. If there is no current selection, obj becomes it.

    Parameters

    • obj: string | string[] | Base | Path | Base[]

      Object to select. May be a Node/Group/Port/Edge or an array of any of these, or a Vertex id, or a Path.

    Returns void

  • Appends some data to the dataset, either via ajax, or directly from a JS object. The only difference between this and load is the events that are fired during the loading process.

    Parameters

    Returns JsPlumbToolkit

    The current instance of the Toolkit. If you provide data directly to this method you can then chain a load call with a subsequent render.

  • Suspends rendering and then runs the given function, unsuspending rendering afterwards and doing a refresh. This method is just a convenience method that handles suspending and subsequent enabling of rendering. You might use this if you're adding a whole load of Nodes or Edges, or maybe you want to add a Node and one or more Edges before the layout recomputes.

    Parameters

    • fn: (() => any)
        • (): any
        • Returns any

    Returns void

  • Bind an event listener. This method can be used with a type parameter by call sites; although it's not necessary it can be helpful to use this to ensure you've thought about what the payload to your event handler is going to be.

    Type Parameters

    • T = any

    Parameters

    • event: string

      Name of the event(s) to bind to.

    • listener: ((a, e?) => any)

      Function to bind to the given event(s)

        • (a, e?): any
        • Parameters

          • a: T
          • Optional e: any

          Returns any

    • Optional insertAtStart: boolean

      Whether or not to insert this listener at the head of the listener queue. Defaults to false.

    Returns EventGenerator

  • Removes a transient vertex from the underlying dataset, and from the list of transient vertices for the given renderer. Removes any edges attached to the transient node. None of these operations occur within a transaction and none are propagated to all attached renderers: only the renderer that invokes this method is notified of the deletion of edges and the node.

    Parameters

    • renderer: ToolkitRenderer<any>
    • v: Node

    Returns void

  • Clears the current selection and fires a selectionCleared event.

    Returns void

  • Commits any changes made in the current transaction to the undo stack. If there is no current transaction this method does nothing.

    Parameters

    • Optional commitAll: boolean

    Returns void

  • Connects two nodes/ports (or a combination of the two), by ID. This function does not know about the DOM: you cannot pass it DOM elements or selectors. By default, this method will create nodes that are missing. Port ids are specified with a dotted syntax, eg foo.bar refers to the port "bar" on the node "foo".

    Parameters

    Returns Edge

    The new Edge.

  • Iterates through all Edges in the Toolkit one at a time. You should not perform destructive editing of the dataset inside one of these loops.

    Parameters

    • fn: ((idx, edge) => void)

      A function that takes (index, edge) as arguments and is applied for every Node in the Toolkit instance.

        • (idx, edge): void
        • Parameters

          • idx: number
          • edge: Edge

          Returns void

    Returns void

  • Iterates through all Groups in the Toolkit one at a time. You should not perform destructive editing of the dataset inside one of these loops.

    Parameters

    • fn: ((idx, group) => void)

      A function that takes (index, node) as arguments and is applied for every Node in the Toolkit instance.

        • (idx, group): void
        • Parameters

          • idx: number
          • group: Group

          Returns void

    Returns void

  • Iterates through all Nodes in the Toolkit one at a time. You should not perform destructive editing of the dataset inside one of these loops.

    Parameters

    • fn: ((idx, node) => void)

      A function that takes (index, node) as arguments and is applied for every Node in the Toolkit instance.

        • (idx, node): void
        • Parameters

          • idx: number
          • node: Node

          Returns void

    Returns void

  • Combines eachNode and eachGroup into one method.

    Parameters

    • fn: ((idx, vertex) => void)
        • (idx, vertex): void
        • Parameters

          • idx: number
          • vertex: Vertex

          Returns void

    Returns void

  • Returns whether or not object(s) exist for the given id(s).

    Parameters

    • Rest ...objects: any[]

      List of ids to check existence for. This method takes an arbitrary number of arguments.

    Returns boolean

    True if objects exist for all given ids, false otherwise.

  • Exports the current data to JSON.

    Parameters

    Returns any

    JSON payload.

  • Filter the dataset and return a Selection containing matches. You can optionally provide a type parameter to indicate the type of objects you expect back in the Selection.

    Type Parameters

    • T = any

    Parameters

    • spec: ((o) => boolean | ObjectData)

      Either a function which is passed every object in the dataset and expected to return true to indicate inclusion, or an object containg key:value pairs to match in the backing data of each object in the dataset

        • (o): boolean | ObjectData
        • Parameters

          • o: Base

          Returns boolean | ObjectData

    • Optional includePartials: boolean

      If true, objects whose data matches one or more, but not all, of the pairs in spec will be included in the result. By default objects have to match all the pairs in spec to be included in the result.

    Returns Selection<T>

  • Finds the object that matches the given spec.

    Parameters

    • spec: string | Edge | Vertex

      If a string, a Node/Port matching that id is retrieved. Otherwise if spec is already a Graph object (Node or Port), it is returned.

    Returns Edge | Graph | Vertex

  • Fire the named event.

    Type Parameters

    • T

    Parameters

    • event: string

      Event to fire

    • Optional value: T

      Value to pass to event handlers

    • Optional originalEvent: Event

      Optional original event that caused this event to be fired.

    Returns any

  • Clears out the undo/redo stacks and discards (neither commits nor rolls back) any existing transaction.

    Returns void

  • Gets all edges for the given Node, Port or Group.

    Parameters

    • obj: Vertex

      Object to retrieve edges for.

    • Optional filter: ((e) => boolean)

      Optional filter function for edge selection.

        • (e): boolean
        • Parameters

          • e: Edge

          Returns boolean

    Returns Edge[]

  • Calculates "clusters" of nodes (and groups), where a 'cluster' is a set of Nodes/Groups that are connected. Direction of connections is not taken into account. Nodes that are children of Groups are included in all cluster calculations, which might cause some weird situations, but this functionality is mostly intended just for Nodes anyway.

    Returns Cluster[]

    An array of arrays, each entry being a list of nodes in the cluster.

  • Gets an Edge by id, or if the given object is already an Edge, hands that back.

    Parameters

    • edgeId: string

      ID of the Edge to retrieve.

    Returns Edge

    The requested Edge, if found, otherwise null.

  • Returns the total number of edges in the graph.

    Returns number

  • Gets the id of the Edge represented by the given arguments. If this is a JS object, we extract the id using the current edgeIdFunction. Otherwise we just pass it back as-is.

    Parameters

    • edge: ObjectData

      Edge from which to retrieve id.

    Returns string

    Edge's id, if we could resolve it, otherwise the object we were given.

  • Gets the type of the Edge represented by the given JS object.

    Parameters

    • edgeData: ObjectData

      Edge's data. Note: this is NOT an Edge object, it is the backing data. You can use getType to get the type for some Toolkit object.

    Returns string

    Either the Edge's type, if set, or "default".

  • Gets a set of edges.

    Parameters

    • Optional params: EdgeSelectionParams

      Options for the edge selection

    Returns Edge[]

  • Returns the current Graph.

    Returns Graph

    The underlying Graph.

  • Gets a Group by its ID, or if the object is already a Group, hands that back.

    Parameters

    • groupId: string

    Returns Group

    The requested Group, if found, otherwise null.

  • Returns the Group at the given index, null if not found.

    Parameters

    • idx: number

      Index into group list

    Returns Group

  • Gets the id of the Group represented by the given arguments. If this is a JS object, we extract the id using the current idFunction. Otherwise we just pass it back as-is.

    Parameters

    • group: string | ObjectData

      Object from which to retrieve id.

    Returns string

  • Gets the type of the Group represented by the given JS object. We first try for a return value from the current typeFunction, but if that returns nothing we just return 'default'.

    Parameters

    • groupData: ObjectData

      Groups's data. Note: this is NOT a Group object, it is the backing data. You can use getType to get the type for some Toolkit object.

    Returns string

    Either the object's type, or default.

  • Returns all the Groups in the Graph.

    Returns Group[]

  • Gets all listeners for the given named event.

    Parameters

    • forEvent: string

    Returns any[]

  • Gets the model registered with this Toolkit instance, if any. Use the Toolkit's model to map data model event handlers and other data model considerations such as the maximum number of connections a Port allows

    Returns DataModel

    Current model. May be null.

  • Gets the Node with the given id.

    Parameters

    • nodeId: string

    Returns Node

  • Returns the Node at the given index.

    Parameters

    • idx: number

    Returns Node

    The Node at the given index, null if not found.

  • Returns the count of nodes in the Graph.

    Returns number

    The count of Nodes in the Graph.

  • Gets the id of the Node represented by the given arguments. If this is a JS object, we extract the id using the current idFunction. Otherwise we just pass it back as-is.

    Parameters

    • node: string | ObjectData

      Object from which to retrieve id.

    Returns string

  • Gets the type of the Node represented by the given JS object. We first try for a return value from the current typeFunction, but if that returns nothing we just return 'default'.

    Parameters

    • nodeData: ObjectData

      Node's data. Note: this is NOT a Node object, it is the backing data. You can use getType to get the type for some Toolkit object.

    Returns string

    Either the object's type, or default.

  • Returns all the nodes in the Graph.

    Returns Node[]

    All the Nodes in the graph.

  • Finds information related to the given object, which may be an existing Toolkit object, a Node/Group/Edge id, or the backing data for some object.

    Type Parameters

    • T

    Parameters

    • obj: string | Edge | Node | Group | Port | ObjectData

      A Node/Group/Edge id, or Node, Port, Group or Edge

    Returns ObjectInfo<T>

    A JS object containing obj (the Toolkit object), id (the Node/Port/Group/Edge ID), type ("Port", "Node", "Group", "Edge")

  • Gets a port by its full id

    Parameters

    • portId: string

      ID of the Port to retrieve, in nodeId.portId syntax.

    Returns Port

    The requested port, if found, otherwise null.

  • Gets the id of the Port represented by the given arguments. If this is a JS object, we extract the id using the current portIdFunction. Otherwise we just pass it back as-is.

    Parameters

    • port: ObjectData

    Returns string

    Port's id, if we could resolve it, otherwise the object we were given.

  • Gets the type of the Port represented by the given JS object

    Parameters

    • port: ObjectData

    Returns string

    Either the port's type, if set, or "default".

  • Gets a renderer by the id parameter supplied to the render call (which is by default null, and only renderers for which an id was supplied are retrievable via this method)

    Type Parameters

    • E

    Parameters

    • id: string

      ID of the renderer to retrieve.

    Returns ToolkitRenderer<E>

    Either a Renderer that was registered against the given id, or null if none found.

  • Gets all renderers registered on this instance of the jsPlumb Toolkit.

    Returns Map<string, ToolkitRenderer<any>>

    A map of id-> ToolkitRenderer pairs.

  • Gets the type of the given Object. This is not a type such as Node, Port or Edge - this is the type of the object as defined by your system to identify types; these are the types used to lookup objects in the view.

    Parameters

    • obj: Base

      Object to retrieve type for

    Returns string

    The object's type.

  • Returns the type function that is currently in use.

    Returns TypeFunction

    Function currently being used to determine types of nodes from their data. The default is to look for a type member in the data.

  • gets the Vertex with the given id.

    Parameters

    • id: string

    Returns Node | Group

  • Returns whether not event firing is currently suspended

    Returns boolean

  • Loads some data, either via ajax, or directly from a JS object.

    Parameters

    Returns JsPlumbToolkit

    The current instance of the Toolkit. If you provide data directly to this method you can then chain a load call with a subsequent render.

  • Opens a transaction.

    Parameters

    • Optional cleanupAction: TransactionCleanupAction

      What to do if a transaction already exists. If you supply nothing, or an inappropriate value, here and there is a current transaction, then an Error is thrown.

    Returns void

  • Redo the latest operation that was undone, if there is one. Otherwise does nothing.

    Returns void

  • Attempts to identify the given argument as a model object, and, if successful, removes it.

    Parameters

    • obj: any

      A string representing the ID of some model object, or a model object of some type.

    Returns void

  • Removes an Edge from the Graph.

    Parameters

    • edge: string | Edge

      The Edge to remove, as either an Edge object or its id.

    • Optional source: any

      The source for the removeEdge operation. For internal use.

    Returns JsPlumbToolkit

    The current Toolkit instance.

  • Removes a Node/Group from a Group.

    Parameters

    • node: string | Node | Group | ObjectData

      Node/Group to remove, or its id, or the data representing it.

    • Optional doNotFireEvent: boolean

      For internal use. If true, a group:removeMember event will not be fired as a result of this operation. Otherwise it will.

    • Optional targetGroup: Group

      For internal use. Group to which the Node is being moved, if that applies.

    • Optional source: ToolkitRenderer<any>

      For internal use. The renderer in which user activity caused this method to be called. We echo that out in the event parameters, allowing renderers to not respond to events they raised.

    Returns Group

    The Group from which the Node was removed.

  • Removes obj from the current selection

    Parameters

    • obj: string | Base | Path | Base[]

      Object to deselect. May be a Node/Edge/Group/Port or an array of any of these, or a Vertex id, or a Path.

    Returns void

  • Removes the given Group from the dataset.

    Parameters

    • group: string | Group

      Group or ID of Group to remove.

    • Optional removeChildren: boolean

      If true, Nodes/Groups that are members of the Group will also be removed. Defaults to false.

    • Optional doNotFireEvent: boolean

      If true, a group:removed will not be fired as a result of this operation. Otherwise it will.

    Returns void

  • Removes the given Node, which may be passed in as the actual Node object, or its id.

    Parameters

    • node: string | Vertex

      Either a Node, or its ID.

    • Optional doNotFireEvent: boolean

    Returns JsPlumbToolkit

    The current Toolkit instance.

  • Removes a Port from the dataset.

    Parameters

    • vertexOrId: string | Node | Group | Port

      If a string is passed in here, it may represent the full ID of some port, ie in "vertex.port" notation, or it may be the ID of the vertex on which the port to be removed resides. If you do not pass a string to this argument you can pass a Port instead, or you can pass the Node/Group on which the port resides (in which case you'll also need to provide a value for portId)

    • Optional portId: string

      Id of the port to remove from the given node. Only required if you did not provide a full port ID, or the Port itself, to vertexOrId.

    Returns boolean

    True if the port existed and was removed, false otherwise.

  • Configures the given element as a Surface, registering it so that it reflects any changes to the underlying data. If there is any data in the Toolkit at the time of this call it is rendered; any data subsequently loaded is automatically rendered. You can supply layout arguments to this method (layout type + layout specific parameters), as well as jsPlumb rules for endpoints, paint styles etc.

    Parameters

    • container: Element

      The Element to render into

    • Optional options: VanillaSurfaceRenderOptions

      Render options

    • Optional templateRenderer: TemplateRenderer<any>

      Optional template renderer to use. This is exposed for the library integrations to attach their own template renderer and is not something a user of the vanilla package is expected to provide.

    Returns Surface

  • Rolls back the current transaction, undoing any changes to the data model made in the transaction. If there is no current transaction this method does nothing.

    Returns void

  • Saves the current data via ajax POST to a given URL.

    Parameters

    Returns JsPlumbToolkit

    The current instance of the Toolkit. If you provide data directly to this method you can then chain a load call with a subsequent render.

  • Gets an ad-hoc selection

    Parameters

    • obj: string | string[] | Base | Path | Base[] | Selection<Edge | Node | Group>

      Object to select. May be a Node/Group/Port/Edge or an array of any one of these, or a Vertex id, a Selection, or a Path.

    • Optional includeEdges: boolean

      If true, include edges between vertices

    Returns Selection<Edge | Node | Group>

  • Selects all descendants of some Node or Group, and, optionally, the Node/Group itself.

    Parameters

    • obj: string | Node | Group

      Node/Group, or ID of Node/Group, to select

    • Optional includeFocus: boolean

      Whether or not to include the focus node/group in the returned dataset. Defaults to false.

    • Optional includeEdges: boolean

      Whether or not to include edges in the returned dataset. Defaults to false.

    Returns Selection<Edge | Node | Group>

  • Sets options for the auto save mechanism.

    Parameters

    • autoSaveOptions: AutoSaveOptions

    Returns void

  • Sets whether or not the original dataset will be updated whenever a node/edge is removed or added. This functionality is suspended when a load operation is taking place. Note that for this functionality to work there must be a manager registered for the given data type in jsPlumbToolkitIO. The Toolkit ships with a manager for the default json datatype, but if you have your own custom datatype you will need to provide one of these to support this functionality. See the documentation on data loading for a full discussion.

    Parameters

    • update: boolean

      True if you want the backing data to be updated, false otherwise.

    Returns void

  • Sets the maximum number of edges that may be selected at any one time. Default is Infinity.

    Parameters

    • maxEdges: number

      Max number of edges allowed to be selected at once.

    Returns void

  • Sets the maximum number of nodes that may be selected at any one time. Default is Infinity.

    Parameters

    • maxNodes: number

      Max number of nodes allowed to be selected at once.

    Returns void

  • Sets obj as the current selection for this instance of the jsPlumb Toolkit.

    Parameters

    • obj: string | Base | Path | Base[]

      Object to select. May be a Node/Edge/Group or an array of any of these, or a Node/Group id, or a Path.

    Returns void

  • Sets The action taken when appending an edge or node that would take the selection above its limit for that given type. Depends on the current capacityPolicy, which can be either Selection.DISCARD_EXISTING (the default) or Selection.DISCARD_NEW.

    Parameters

    • policy: string

      One of Selection.DISCARD_EXISTING (which removes the 0th entry from the list before insertion of the new value) or Selection.DISCARD_NEW.

    Returns void

  • Sets the source for the given edge to be the given vertex.

    Parameters

    • edge: Edge

      Edge to set source for.

    • o: string | Vertex

      ID of vertex, or vertex.

    • Optional doNotFireEvent: boolean

    Returns any

  • Sets whether not event firing is currently suspended

    Parameters

    • val: boolean

    Returns void

  • Sets whether operations on the underlying graph are suspended. When this is true, no changes will be made to the underlying graph.

    Parameters

    • v: boolean

    Returns void

  • Suspends or re-enables rendering. This method simply round-robins all the registered renderers and calls setSuspendRendering on each of them.

    Parameters

    • v: boolean

      True to suspend rendering, false to enable it.

    • Optional thenRefresh: boolean

      Defaults to false. If true, a refresh will be called on all renderers after rendering is unsuspended.

    Returns void

  • Sets the target for the given edge to be the given vertex.

    Parameters

    • edge: Edge

      Edge to set target for.

    • o: string | Vertex

      ID of vertex, or vertex.

    • Optional doNotFireEvent: boolean

    Returns any

  • Sets the type of the given object. This will do two things:

    1. update the appropriate property in the object's data to this new value. You can set what properties define types, but by default each of Node, Edge and Port use type as the property that indicates their type.
    2. attempt to apply a type definition for the new type, if one is found. NB this only applies to Edge objects, as at version 1.1.0. Support for Nodes (including switching node templates) is a possible future enhancement.

    Parameters

    • obj: Base

      Object to set the type for.

    • type: any

      Type to set on the object.

    Returns void

  • Run the given function without firing any events.

    Parameters

    • fn: Function

    Returns void

  • Helper method to allow JSON.stringify to be called with an instance of the Toolkit as argument (JSON.stringify looks for a toJSON() method on each object it is attempting to serialise). This method generates the same output as calling exportData().

    Returns any

  • Toggles whether or not the given obj forms part of the current selection.

    Parameters

    • obj: string | Base | Path | Base[]

      Object to select. May be a Node/Group/Port/Edge or an array of any of these, or a Vertex id, or a Path.

    Returns void

  • Opens a transaction and runs the given function within it, then commits the transaction. If your function returns false (boolean false, not false-y), the transaction is rolled back instead of committed.

    Parameters

    • fn: (() => any)

      Function to run.

        • (): any
        • Returns any

    • Optional cleanupAction: TransactionCleanupAction

      What to do if a transaction already exists.

    Returns void

  • Unbind the given event listener, or all listeners. If you call this method with no arguments then all event listeners are unbound.

    Parameters

    • Optional eventOrListener: string | Function

      Either an event name, or an event handler function

    • Optional listener: Function

      If eventOrListener is defined, this is the event handler to unbind.

    Returns EventGenerator

  • Undo the latest operation, if there is one. Otherwise does nothing.

    Returns void

  • Updates the given object, notifying any renderers to do a repaint.

    Parameters

    • object: Base

      Either a Node, Group, Port or Edge, or, as a string, the id of some Node, Group, Port or Edge.

    • Optional updates: ObjectData

      An object with path->value pairs. Path can be in dotted notation. You do not actually have to supply this, although in most cases you will want to. But there are edge cases in which you might simply wish to kick off a repaint.

    • Optional reason: string

    Returns void

  • Updates the given Edge, notifying any Renderers to do a redraw. If autoSave is set, this method will cause the dataset to be saved.

    Parameters

    • obj: string | Edge

      Either an Edge, an Edge id, or the backing data for an Edge.

    • Optional updates: ObjectData

      An object with path->value pairs. Path can be in dotted notation. You do not actually have to supply this, although in most cases you will want to. But there are edge cases in which you might simply wish to kick off a repaint.

    • Optional reason: string

    Returns void

  • Updates the given Group, notifying any Renderers to do a redraw. If autoSave is set, this method will cause the dataset to be saved.

    Parameters

    • group: string | Group | ObjectData

      Either a Group, a Group id, or the backing data for a Group.

    • Optional updates: ObjectData

      An object with path->value pairs. Path can be in dotted notation. You do not actually have to supply this, although in most cases you will want to. But there are edge cases in which you might simply wish to kick off a repaint.

    • Optional reason: string

    Returns void

  • Updates the given Node, notifying any Renderers to do a redraw. If autoSave is set, this method will cause the dataset to be saved.

    Parameters

    • node: string | Node | ObjectData

      Either a Node, a Node id, or the backing data for a Node.

    • Optional updates: ObjectData

      An object with path->value pairs. Path can be in dotted notation. You do not actually have to supply this, although in most cases you will want to. But there are edge cases in which you might simply wish to kick off a repaint.

    • Optional reason: string

    Returns void

  • Updates the given Port, notifying any Renderers to do a redraw. If autoSave is set, this method will cause the dataset to be saved.

    Parameters

    • port: string | Port

      Either a Port, or a full Port id

    • Optional updates: ObjectData

      An object with path->value pairs. Path can be in dotted notation. You do not actually have to supply this, although in most cases you will want to. But there are edge cases in which you might simply wish to kick off a repaint.

    • Optional reason: string

    Returns void

  • Updates the given Node/Group, notifying any Renderers to do a redraw. If autoSave is set, this method will cause the dataset to be saved.

    Parameters

    • vertex: string | Node | Group | Port | ObjectData

      Either a Node/Group, a Node/Group id, or the backing data for a Node/Group.

    • Optional updates: ObjectData

      An object with path->value pairs. Path can be in dotted notation. You do not actually have to supply this, although in most cases you will want to. But there are edge cases in which you might simply wish to kick off a repaint.

    • Optional reason: string

    Returns void

Version :