@Kakit wrote:
Hi,
I been having this problem since last night, I want to delete some links from the diaram programmtically. Here's the code.
let linksToRemove = []; node.findLinksInto().each(function(link) { linksToRemove.push(link); }); node.findLinksOutOf().each(function(link) { linksToRemove.push(link); }); linksToRemove.forEach(function(link){ console.log(diagram.model.containsLinkData(link.data)); // return false !!!! This should be true. some times return true though diagram.model.removeLinkData(link); console.log(diagram.model.containsLinkData(link.data)); // return false });
This result in sometime the links are deleted while sometime is not. I dont know what could be the issue?
Cheers,
Posts: 4
Participants: 3