Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Issue with default cascade line style (Read 3607 times)
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Issue with default cascade line style
Feb 1st, 2011 at 9:13am
Print Post  
Hi Stoyo

In the document attached to following link you will find the information about how default straight line gets generated and its behavior when nodes are re-positioned.

Similar thing is expected with cascadling line style. The document will provide the scenarios and results displayed and expected result.

http://cid-2b9bf77533900b84.office.live.com/self.aspx/.Public/ISSUE%20WITH%20LIN...

The expected results should be generated by default without any additional event handling. The expected things are marked in yellow color.

I tried to explain these requirements in word document since while making sample the issues i am facing is implementation of one fix breakes another implementation. Also there are other issues releated to non-anchor points which are explained in another thread.

Regards
Rajesh
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Issue with default cascade line style
Reply #1 - Feb 2nd, 2011 at 8:37am
Print Post  
Hi Rajesh,

What Dynamic does is to update the first/last point positions automatically when their adjacent points or the linked nodes are moved, so that the end points lie on the node side nearest to the second or next-to-last point. However it does not move the second or next-to-last points from their current positions, and for cascading links the last segment won't necessarily point to the node center.

Also you expect Dynamic links to change their number of segments depending on the node position. The Dynamic property does not do that, but AutoRoute does. So try using AutoRoute instead of Dynamic for cascading links. If you also set RoutingOptions.Anchoring to Reassign, auto-routed links will move to closer sides of nodes too, similar to dynamic links.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Re: Issue with default cascade line style
Reply #2 - Feb 2nd, 2011 at 9:01am
Print Post  
Hi Stoyo

I checked with your suggestion about setting autoroute and re-assingn anchor property.

I also checked the implementation in WPF controls.

With WPF mindfusion control, when line style is dynamic and line style is cascadling the default line generated is from center. I think this is bug with silverlight control.

Also, the Autoroute and Reassignn anchor should come in picture when nodes or links are re-positioned. As per your suggestion it works with Anchor point as expected. When node don't have anchor point it calculates first & last point which is nearest to node. This behavior is same as you replyed in your answer. I think here it should consider the dynamic propertly when calculating the position.

I think if you fix following two thing in mindfusion silverlight code -
1. When line is drawn by default between two nodes and line style is cascading and donot have anchor points assinged, it should consider center of node [ Similar to WPF ]

2. When line style is dynamic, and autorouting = true, it should consider center of node while calculating first & last postion.

the result i will get are -
1. By default center gets considered for cascading line when anchor are not set. ( May be center considering can be done only if dynamic = true)
2. Dynamic = false, won't recalculate the first and last point but autoroute gets applied depending on node position.
3. When dynamic = true, autoroute gets applied and center is preserved.

-Rajesh
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Issue with default cascade line style
Reply #3 - Feb 2nd, 2011 at 1:11pm
Print Post  
I can see exactly the same behavior in the WPF and Silverlight versions, with everything else at default values but DynamicLinks set to true and LinkShape to Cascading. Also assuming you are using the standard DiagramLink class.

The link ends are initially placed at the intersection points of the line connecting node centers and the border lines. Then if you move a node, the link indeed gets closer to the middle of nodes' borders, but actually that was never intended. It's a side effect from continuously placing the end point at the intersection of the line between the node center and the second point, and then aligning the second point to the first point to keep the segment strictly horizontal or vertical. You will see this happens gradually if you move the node slowly pixel by pixel.

If the end segments end up aligned to the center after few moves anyways, I suppose we could change the Dynamic behavior for cascading links so they start aligned to the center from the very beginning. For changing the number of segments according to the node position, you will still have to enable AutoRoute though.

Stoyan
  
Back to top
 
IP Logged
 
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Re: Issue with default cascade line style
Reply #4 - Feb 2nd, 2011 at 1:24pm
Print Post  
Hi Stoyo

This is what I need - "If the end segments end up aligned to the center after few moves anyways, I suppose we could change the Dynamic behavior for cascading links so they start aligned to the center from the very beginning."

Hope you will provide me the updates for same very soon. Smiley
Also when the next version of diagramlite library will be released ?


Also just for clarification, if my queries are not clear -

The link ends are initially placed at the intersection points of the line connecting node centers and the border lines. --> This is possible in WPF but not in silverlight. First point in my query.

The other two points behaviour is same in WPF & silverlight and what you said in last para of your reply is expected.

-Rajesh



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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Issue with default cascade line style
Reply #5 - Mar 8th, 2011 at 1:39pm
Print Post  
Hi Rajesh,

The build from the PM page makes dynamic cascading links connect to the border center points. It also adds a virtual UpdateDynamicLink method you can override as we discussed in another thread.

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