Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) Node anchor points are out of place (Read 7980 times)
Gravity
Junior Member
**
Offline


I Love MindFusion!

Posts: 52
Joined: Sep 21st, 2016
Re: Node anchor points are out of place
Reply #15 - Sep 7th, 2017 at 1:53pm
Print Post  
Gravity wrote on Sep 7th, 2017 at 1:05pm:
Gravity wrote on Sep 7th, 2017 at 10:16am:
I see problem here in a usage. setDestination function takes two arguments (destination, anchorpoint)
If second parameter not set it use already created parameters "details")




My question would be why setDestination function does not attach to anchor point?


Code (Javascript)
Select All
   var gatewayAnchorPoints = [new AnchorPoint(50, 0),
        new AnchorPoint(100, 50),
        new AnchorPoint(50, 100),
        new AnchorPoint(0, 50)];

    gateway.setAnchorPattern(gatewayAnchorPoints);

destinationNode.incomingLinks[1].setDestination(gateway, gateway.getAnchorFromIndex(1));


diagram.routeAllLinks();

 



This kindof place link at correct anchor point, but does not attach to it. Maybe you would know why?

In documentaiton i can find "ReassignAnchorPoints" method, but can't find it in source...is this something that ought to be?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Node anchor points are out of place
Reply #16 - Sep 8th, 2017 at 7:49am
Print Post  
link.setDestination(node) should now attach to anchor point with this version -
https://mindfusion.eu/Forum/YaBB.pl?num=1504852763

If you also want to specify the anchor point explicitly, you could call link.setDestinationAnchor(1);

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint