HTMLGraph

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:

NameTypeDescriptionRequiredDefault
idanyIdentifier of the edge to updateyes
updateRequestEdgeUpdateRequestProperties to updateno{}

EdgeUpdateRequest Parameters

NameTypeDescriptionRequired
fromanyIdentifier of source portno
toanyIdentifier of target portno
shapeEdgeShapeEdge shapeno
prioritynumberZ-index of the edgeno