saurav singh
saurav singh

Reputation: 43

how to change node highlight shape while creating link between two nodes (gojs)

image

As in the image, the nodes are circular but the highlight shape is rectangle . I want to change this rectangle shape to circular while creating link between two nodes.

Upvotes: 2

Views: 245

Answers (1)

Jon Hardy
Jon Hardy

Reputation: 176

(Copied from forum)

You could set a portTargeted function to set the temporaryFromPort or temporaryToPort to match the figure of the targeted port.

myDiagram.toolManager.linkingTool.portTargeted = function(realnode, realport, tempnode, tempport, toend) {
  if (realport === null) {
    tempport.figure = "Square";
  } else {
    tempport.figure = realport.figure;
  }
}

You probably want to do the same for the RelinkingTool.

Upvotes: 1

Related Questions