Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get outgoing links of an element

Tags:

jointjs

I want to get all the outgoing links associated with an element .What is the way to achieve this in jointJs .Actually I have tried something like this but It is giving result for both outgoing and incoming .

paper.findViewByModel(start).options.inbound=true;
alert(graph.getConnectedLinks(start));
like image 540
ashishk Avatar asked Aug 12 '14 06:08

ashishk


1 Answers

Just use

var outboundLinks = graph.getConnectedLinks(myElement, { outbound: true })

See the JointJS API reference here http://jointjs.com/api#joint.dia.Graph:getConnectedLinks.

like image 54
dave Avatar answered Oct 31 '22 12:10

dave