How Can I find a link by a labelKeys. I try to find by example myDiagram.findLinksByExample({ “labelKeys”: “-10” }) but i can’t. I only can findLinksByExample with from or to. Please, can someone help me? Thank you very much.
if labelKeys is serving some other purpse in your data, you will need a smarter find… predicate, since labelKeys in your data is an array and not a number or string.
I tried myDiagram.findLinksByExample({ labelKeys: [-8] }), but it looks like there might be a bug with findLinksByExample using arrays. We’ll investigate that.
We have fixed a bug dealing with how findNodesByExample and findLinksByExample match arrays. That will be out in the next release. We just released yesterday, so the next release may be a week or two.
function canviarRelacio(port, origen, desti) {
valorClau = port.labeledLink.data.labelKeys;
var it = myDiagram.links;
var aux = false;
var actual;
while (!aux && it.next() ) {
actual = it.value.data.labelKeys[0];
aux = actual == valorClau;
}
}