Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 6972

Sometimes diagram.model.removeLinkData(linkdata) not working

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 6972

Trending Articles