Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Link with CustomDraw=Full, cascading LinkStyle (Read 3046 times)
MUDO
Junior Member
**
Offline



Posts: 90
Joined: Nov 29th, 2008
Link with CustomDraw=Full, cascading LinkStyle
Jan 15th, 2009 at 6:41pm
Print Post  
Hi.

I want to do this:

I have my own starting & ending points of links. It is M:N relationship betweenn two tables. I want to use cascade & polyline (a oblique line) style of links.

Since I want to draw starting & ending points ONLY horizontaly or vertically I need additional space around shape --> on a picture is this area as RED. In this area I want to have all segments of links in horizontal or vertical orientation.

http://i40.tinypic.com/2uh7701.jpg


How to do this?

1) I was thinking about creating hundreds of anchorpoints around shape. There is a problem with coordinates of these points because they are set relative to shape (in percent).

2) Another way is to play with anchorpoints of cascade links. But x&y coordinates are readonly (am I right?). I have a link with CustomDraw=Full. In DrawLink event I draw my own line. After that original anchorpoints are still visible and area bounded by original link is handling link selection. Is it possible to establish my line as a new link? So when I click on a line it has the same effect like when I clicked on original link? Is it possible to arrange anchorpoints (x & y coordinates)?

So. I think Im not first who want to do something similar.

Can you give me some suggestion what is possible, good and effective?

Thanx!


...MUDO..
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link with CustomDraw=Full, cascading LinkStyle
Reply #1 - Jan 15th, 2009 at 7:06pm
Print Post  
You want the links not to bend inside the red area?
  
Back to top
 
IP Logged
 
MUDO
Junior Member
**
Offline



Posts: 90
Joined: Nov 29th, 2008
Re: Link with CustomDraw=Full, cascading LinkStyle
Reply #2 - Jan 15th, 2009 at 7:20pm
Print Post  
Hi!

Yes.

Im just testing something.

This is my solution:

link.SnapToNodeBorder = True
link.HeadShape = MindFusion.Diagramming.ArrowHead.None
link.Style = MindFusion.Diagramming.LinkStyle.Cascading
link.AutoRoute = True

Diagram.AllowUnanchoredLinks = True
link.CustomDraw = MindFusion.Diagramming.CustomDraw.Additional


Then I handle Diagram_DrawLink where I draw starting & ending points of links.

This is working now as I want. And that is working when style of links is polyline as well! First segments of links are still horizontal or vertical. OK!

Question is: for what is link.CascadeOrientation? I dont see any changes!


...MUDO...
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link with CustomDraw=Full, cascading LinkStyle
Reply #3 - Jan 16th, 2009 at 9:31am
Print Post  
Hi,

It seems link.AutoRoute overrides link.CascadeOrientation, using the StartOrientation in RoutingOptions instead.

Stoyan
  
Back to top
 
IP Logged
 
MUDO
Junior Member
**
Offline



Posts: 90
Joined: Nov 29th, 2008
Re: Link with CustomDraw=Full, cascading LinkStyle
Reply #4 - Jan 16th, 2009 at 10:36am
Print Post  
No. It doesnt work. It seems like AutoRoute overrides link.CascadeOrientation and all RoutingOptions Sad
Any new idea?

All what I want to do is force first segment to be in vertical or horizontal way.


...MUDO...
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link with CustomDraw=Full, cascading LinkStyle
Reply #5 - Jan 18th, 2009 at 10:50am
Print Post  
The link routing function finds a route between the current end points of the link, without moving them to ensure RoutingOptions.Start/EndOrientation are appropriate for the node side to which a link is connected - is that the problem? So if you need a link start segment to be vertical, you'd have to align the link's ControlPoints[0] to the top or bottom of the node before routing.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint