In this sample https://gojs.net/latest/samples/arrowheads.html, I have added Click button and written its functionality as
function changeArrowHead() {
mydiagram.links.each(e=> {
e.diagram.startTransaction(“link”);
e.data.fromArrow="";
e.data.toArrow="";
e.diagram.commitTransaction(“link”);
});
console.log(mydiagram.model.toJson())
// mydiagram.rebuildParts();
}
and Link template I have added makeTwoWay() for both fromArrow and ToArrow shape.
In console it’s printing link data as fromArrow/toArrow=""(as expected). But it is reflecting visually in diagram. If I used Diagram.rebuiltParts then it’s working. I need to change the arrow head without calling Diagram.rebuiltParts