Update Edge
Updates specified properties of an edge.
canvas.updateEdge("edge-1", { from: "port-3", to: "port-4", })
All available parameters are demonstrated in the following example:
canvas.updateEdge("edge-1", { from: "port-3", to: "port-4", shape: new HorizontalEdgeShape(), priority: 10, })
When called without parameters, the edge’s coordinates will be recalculated.
canvas.updateEdge("edge-1")
Parameters for updateEdge
:
Name | Type | Description | Required | Default |
---|---|---|---|---|
id | any | Identifier of the edge to update | yes | |
updateRequest | EdgeUpdateRequest | Properties to update | no | {} |
EdgeUpdateRequest
Parameters
Name | Type | Description | Required |
---|---|---|---|
from | any | Identifier of source port | no |
to | any | Identifier of target port | no |
shape | EdgeShape | Edge shape | no |
priority | number | Z-index of the edge | no |