Canvas
The Canvas API provides a set of methods and properties for managing graph visualization. Below is an overview of its functionality:
addNode
Create and add a node to the canvas.
updateNode
Update the properties of an existing node.
removeNode
Remove a node from the canvas.
markPort
Mark an element as a port.
updatePort
Update the configuration of a port.
unmarkPort
Unmark an element as a port.
addEdge
Create and add an edge between ports on the canvas.
updateEdge
Update the properties of an existing edge.
removeEdge
Remove an edge from the canvas.
patchViewportMatrix
Modify the viewport transformation matrix.
patchContentMatrix
Modify the content transformation matrix.
clear
Remove all nodes and edges from the canvas.
destroy
Revert the canvas element to its initial state and free up memory.