Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Link drop shadows and selfLoops (Read 1059 times)
xan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Jul 16th, 2008
Link drop shadows and selfLoops
Aug 29th, 2008 at 9:48am
Print Post  
Two questions this time which I can't find solutions for in the documentation...

1) I need to (optionally) disable drop shadows on links, seperately from nodes. I can easily do this when the user is drawing links (InitializeLink handler), but not so easily when creating links programatically. There are many places in my code where links are created programatically, and I would rather not have to edit the shadow colour at each place! Is there an alternative that I have missed for setting link shadow colour / properties globally, seperatly from the node shadows?

2) I have a slight problem with self-connected nodes. The links for these draw as "loopback" arrows, which is fine when a user draws the link. When adding such a link programatically however (for example when recreating my diagram from my underlying data structure) a problem occurs. The link is drawn, joining the anchor points it should join, but as a straight line rather than as a "loopback". The result of this is that the link becomes difficult / imposible to see, especially when the source and destination anchor point are the same (the link length is 0)!

Any help on these issues is, as ever, greatly appreciated.

Cheers,

xan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link drop shadows and selfLoops
Reply #1 - Aug 29th, 2008 at 11:21am
Print Post  
Hi,

1) Use the ItemAdded event: it is raised both for items added by the user and for programmatically added ones.

2) If you want the links to stick to the AnchorPoints, you might call Route() after creating reflexive links. If you want to get the loop-like look, set Style = Bezier, SegmentCount = 1, and set the ControlPoitns position so that points 0 and 3 are at the middle of the node's top side, and points 1 and 2 are at two cm above the node with two cm distance between them.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint