Connecting ports within a node
Opened this issue · 5 comments
There's a layout option for this: de.cau.cs.kieler.selfLoopInside: true
. You have to set this for both the containing node and the specific edge that should be routed inside.
Thanks for the reply. But it seems that the option works only if the node has a child.
I tried the following two graphs.
{"children":[{"edges":[{"sourcePort":"node..port2","id":"node..port2->node..port1","text":"port2 is depended on port1","source":"node","type":"dep","targetPort":"node..port1","target":"node","properties":{"de.cau.cs.kieler.selfLoopInside":true}}],"width":40.0,"id":"node","text":"node","ports":[{"id":"node..port1","text":"port1","type":"R","properties":{"de.cau.cs.kieler.portSide":"WEST"}},{"id":"node..port2","text":"port2","type":"P","properties":{"de.cau.cs.kieler.portSide":"EAST"}}],"properties":{"portConstraints":"FIXED_SIDE","de.cau.cs.kieler.selfLoopInside":true},"height":40.0}],"id":"","properties":{"portConstraints":"FIXED_SIDE"}}
{"children":[{"edges":[{"sourcePort":"node..port2","id":"node..port2->node..port1","text":"port2 is depended on port1","source":"node","type":"dep","targetPort":"node..port1","target":"node","properties":{"de.cau.cs.kieler.selfLoopInside":true}}],"width":40.0,"id":"node","text":"node","ports":[{"id":"node..port1","text":"port1","type":"R","properties":{"de.cau.cs.kieler.portSide":"WEST"}},{"id":"node..port2","text":"port2","type":"P","properties":{"de.cau.cs.kieler.portSide":"EAST"}}],"children":[{"id":"dummy"}],"properties":{"portConstraints":"FIXED_SIDE","de.cau.cs.kieler.selfLoopInside":true},"height":40.0}],"id":"","properties":{"portConstraints":"FIXED_SIDE"}}
I believe this is not the case in the Java version. Back then, I had to implement the graph importer to properly handle the case of inside self loops without children. This modification needs to be made in the KLayJS graph importer as well.
Is there any sample for hierarchy with ports?