Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Relation Intermediate Shapes (Read 4636 times)
TyreeC
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Feb 23rd, 2011
Relation Intermediate Shapes
Feb 23rd, 2011 at 10:21am
Print Post  
Hi, I am having a strange issue when using the DiagramLink.IntermediateShape.

I have two nodes on the view connected via a DiagramLink with the IntermediateShape set to ArrowHead.PointerArrow.

Everything is fine and the arrow points to the correct node.  However, when I move one of the nodes, the arrow flips directions until the node is released again.

I have placed breakpoints everywhere I can think of, but the flip seems to happen before the events such as selectionMoving, nodeModifying and the event linkModifying is never raised.

Can anyone help in explaing how to to stop the arrow flipping during the node movement?

Many thanks for any pointers.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Relation Intermediate Shapes
Reply #1 - Feb 23rd, 2011 at 10:48am
Print Post  
Hi, What version of the control are you using and could you post the link property values here?
  
Back to top
 
IP Logged
 
TyreeC
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Feb 23rd, 2011
Re: Relation Intermediate Shapes
Reply #2 - Feb 23rd, 2011 at 12:01pm
Print Post  
Hi, when I look at the details for the MindFusion.Common.dll it says the Product Version is 1.0.2608.20825

When the relation is created we setup the following:

arrow.AutoRoute = false;
arrow.BaseShape = ArrowHead.None;
arrow.HeadShape = ArrowHead.None;
arrow.Brush = new MindFusion.Drawing.SolidBrush(lineColor);
arrow.Pen.Color = Color.Blue;
arrow.Pen.Width = 0.6f;
arrow.IntermediateShape = ArrowHead.PointerArrow;
arrow.IntermediateShapeSize = 2;
arrow.ToolTip = "";
arrow.ControlPoints[0] = new PointF((float)(p1.X + dx), (float)(p1.Y + dy));
arrow.ControlPoints[1] = new PointF((float)(p2.X + dx), (float)(p2.Y + dy));

Hope this is the information you requested, if not please let me know.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Relation Intermediate Shapes
Reply #3 - Feb 23rd, 2011 at 12:44pm
Print Post  
Are you sure p1 is located at the origin node and p2 at the destination node?
  
Back to top
 
IP Logged
 
TyreeC
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Feb 23rd, 2011
Re: Relation Intermediate Shapes
Reply #4 - Feb 23rd, 2011 at 12:57pm
Print Post  
Looking at the code, yes that seems to be true. The above code is only called once at creation, and the arrow is pointing in the correct direction, it is only while moving one of the nodes the arrow flips over.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Relation Intermediate Shapes
Reply #5 - Feb 23rd, 2011 at 1:22pm
Print Post  
If you set HeadShape to a value different from None, what does happen with it once you start moving the node?
  
Back to top
 
IP Logged
 
TyreeC
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Feb 23rd, 2011
Re: Relation Intermediate Shapes
Reply #6 - Feb 23rd, 2011 at 2:23pm
Print Post  
Ah-ha, The head arrow appeared on the 'wrong' end.  Further investigation led me to a specific code path that created the initial arrow backwards even though the source and destinations were correct.

Thank you for the prompts, bug fixing others code can be frustrating  Smiley
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Relation Intermediate Shapes
Reply #7 - Feb 23rd, 2011 at 2:35pm
Print Post  
Always a pleasure Wink
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint