Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Arrow head appearing on centre of node, not edge (Read 6760 times)
matt.s
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Apr 3rd, 2008
Arrow head appearing on centre of node, not edge
Oct 13th, 2008 at 12:51pm
Print Post  
Hi,

We have a strange problem when creating nodes in our diagram. The behaviour on the diagram is set to DrawLinks.

Basically, when we create a node and link it to a second node, the arrow head points to the outer edge of the of the second node, which is the behaviour we desire.

However, if we link two nodes which are very close together (almost on top of each other) the arrow points to the centre of the second node. Ideally we would want this set to the outer edge if possible.

Is there a way we can achieve this?

I can email screenshots if this doesn't make any sense!

Thanks
Matt

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrow head appearing on centre of node, not ed
Reply #1 - Oct 13th, 2008 at 2:48pm
Print Post  
Hi,

This should happen only when the nodes intersect. Are you using ShapeNodes, or some custom node type?

Stoyan
  
Back to top
 
IP Logged
 
matt.s
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Apr 3rd, 2008
Re: Arrow head appearing on centre of node, not ed
Reply #2 - Oct 13th, 2008 at 3:50pm
Print Post  
Hi,

We are using ShapeNode.

The nodes are intersected when the link is made. 

When one of the nodes is pulled away from the first node so they are not intersected the arrow head still points to the middle of the node.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrow head appearing on centre of node, not ed
Reply #3 - Oct 14th, 2008 at 9:16am
Print Post  
Hi,

If you set link.Dynamic = true, the link ends will align to the node edges when you pull the nodes apart.

Stoyan
  
Back to top
 
IP Logged
 
matt.s
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Apr 3rd, 2008
Re: Arrow head appearing on centre of node, not ed
Reply #4 - Oct 14th, 2008 at 9:57am
Print Post  
Hi,

This is exactly what we are after! - Thanks.

One small question; I've just noticed that we can click on each end of the link and detach it away from the node - this behaviour existed before turning Dynamic on. 

Is there any way of preventing the user from dragging the link away?

Thanks
Matt
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrow head appearing on centre of node, not ed
Reply #5 - Oct 14th, 2008 at 1:16pm
Print Post  
Hi,

Set the AllowMoveStart and AllowMoveEnd properties of DiagramLink to false.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
matt.s
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Apr 3rd, 2008
Re: Arrow head appearing on centre of node, not ed
Reply #6 - Oct 14th, 2008 at 2:44pm
Print Post  
Hi,

That works a treat!

Thanks for your help.
  
Back to top
 
IP Logged
 
Paul Eden
Full Member
***
Offline



Posts: 128
Joined: Aug 15th, 2007
Re: Arrow head appearing on centre of node, not ed
Reply #7 - Oct 15th, 2008 at 1:35pm
Print Post  
Seconded - top stuff  Smiley


Paul Eden
  
Back to top
WWW  
IP Logged
 
IgorS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 13
Joined: Sep 22nd, 2008
Re: Arrow head appearing on centre of node, not ed
Reply #8 - Oct 17th, 2008 at 11:02am
Print Post  
Hi, Stoyan.

Please answer one question, seems to be related. What can I do to reattach links to node border (or anchor points) after node resizing? Now arrowheads can appear inside or outside the node after i call ResizeToFitText method. Thanks a lot.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrow head appearing on centre of node, not ed
Reply #9 - Oct 17th, 2008 at 12:54pm
Print Post  
Hi Igor,

The links stayed connected to the borders in my test, using ShapeNode.ResizeToFit(KeepRatio). What kind of nodes and links are you using?

Stoyan
  
Back to top
 
IP Logged
 
IgorS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 13
Joined: Sep 22nd, 2008
Re: Arrow head appearing on centre of node, not ed
Reply #10 - Oct 17th, 2008 at 1:16pm
Print Post  
Hi,

Just simple ShapeNode's (Rectangle) and default links. I use ShapeNode.ResizeToFit(KeepHeight).
  
Back to top
 
IP Logged
 
IgorS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 13
Joined: Sep 22nd, 2008
Re: Arrow head appearing on centre of node, not ed
Reply #11 - Oct 17th, 2008 at 1:39pm
Print Post  
Oh, I found the solution of 2 problems at the same time! Smiley
With simple dummy method:
Code
Select All
	  private void ResizeNode(ShapeNode node)
	  {
		node.ResizeToFitText(FitSize.KeepHeight);
		node.Resize(node.Bounds.Width + 5, node.Bounds.Height);
	  }
 


i got arrowhead attached to anchors points and "margins" for the node. Smiley
Anyway thanks for reply.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrow head appearing on centre of node, not ed
Reply #12 - Oct 17th, 2008 at 1:55pm
Print Post  
So ResizeToFitText(KeepHeight) works incorrectly if it does not align the arrowheads. I'll pass this to our developer.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint