Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Programmatically Draw Links Between Anchors (Read 1916 times)
alukes
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 61
Joined: Jul 1st, 2011
Programmatically Draw Links Between Anchors
Jan 19th, 2017 at 2:26pm
Print Post  
I need to capture the end points of a link when a user creates a link or when they move a node. Later I use that information to programmatically draw the links.

Is it possible to obtain the source and destination anchor index and later use that information to draw the link?

Thanks
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Programmatically Draw Links Between Anchors
Reply #1 - Jan 19th, 2017 at 5:31pm
Print Post  
If you use anchor points, you can get and restore indices using these DiagramLink methods (they are marked as @private by mistake and not imported in help file, we'll fix for next release) -

Code
Select All
getOriginAnchor: function ()
setOriginAnchor: function (index)
getDestinationAnchor: function ()
setDestinationAnchor: function (index) 



If you don't use anchor points, try get/setStartPoint and get/setEndPoint methods.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
alukes
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 61
Joined: Jul 1st, 2011
Re: Programmatically Draw Links Between Anchors
Reply #2 - Jan 20th, 2017 at 4:52am
Print Post  
That works. Great support as usual.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint