Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Drag diagram link by name (Read 3444 times)
lexeranddn
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Nov 30th, 2018
Drag diagram link by name
May 22nd, 2019 at 12:10pm
Print Post  
Is it possible to drag diagramlink by name?
Thanks
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: Drag diagram link by name
Reply #1 - May 22nd, 2019 at 1:35pm
Print Post  
Do you mean by grabbing its Text or LinkLabels? And then what would you expect  the drag operation to do?
  
Back to top
 
IP Logged
 
lexeranddn
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Nov 30th, 2018
Re: Drag diagram link by name
Reply #2 - May 22nd, 2019 at 1:54pm
Print Post  
Slavcho wrote on May 22nd, 2019 at 1:35pm:
Do you mean by grabbing its Text or LinkLabels? And then what would you expect the drag operation to do?

By Text, drag operation.
Thanks
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: Drag diagram link by name
Reply #3 - May 23rd, 2019 at 8:39am
Print Post  
Changing text's position by dragging it is not supported if that's what you mean. Try using a ShapeNode attached to the DiagramLink (with AttachTo method) to achieve that. Set Transparent property of such nodes to hide their geometry and leave only their Text visible.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
lexeranddn
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Nov 30th, 2018
Re: Drag diagram link by name
Reply #4 - May 23rd, 2019 at 10:02am
Print Post  
Slavcho wrote on May 23rd, 2019 at 8:39am:
Changing text's position by dragging it is not supported if that's what you mean. Try using a ShapeNode attached to the DiagramLink (with AttachTo method) to achieve that. Set Transparent property of such nodes to hide their geometry and leave only their Text visible.

Regards,
Slavcho


Thanks Slavcho, but I mean dragging diagramLink by its Text, not only dragging Text itself.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: Drag diagram link by name
Reply #5 - May 23rd, 2019 at 1:32pm
Print Post  
But what should the drag operation do? Like move the whole link, the segment where text is located, or nearest control point?
  
Back to top
 
IP Logged
 
lexeranddn
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Nov 30th, 2018
Re: Drag diagram link by name
Reply #6 - May 23rd, 2019 at 2:32pm
Print Post  
Slavcho wrote on May 23rd, 2019 at 1:32pm:
But what should the drag operation do? Like move the whole link, the segment where text is located, or nearest control point?

The whole link.
Regards
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: Drag diagram link by name
Reply #7 - May 24th, 2019 at 7:44am
Print Post  
You can find code for moving the whole link here -
https://mindfusion.eu/Forum/YaBB.pl?num=1548142738/1#1

I can't see any public API to detect where link.Text is located. If you use a LinkLabel instance instead of Text, you could then call LinkLabel.GetEditRect to find the label's position. Other than that, maybe use WPF's VisualTreeHelper to find if there's a GlyphRunDrawing near the mouse position.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
lexeranddn
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Nov 30th, 2018
Re: Drag diagram link by name
Reply #8 - May 27th, 2019 at 1:14pm
Print Post  
Slavcho wrote on May 24th, 2019 at 7:44am:
You can find code for moving the whole link here -
https://mindfusion.eu/Forum/YaBB.pl?num=1548142738/1#1

I can't see any public API to detect where link.Text is located. If you use a LinkLabel instance instead of Text, you could then call LinkLabel.GetEditRect to find the label's position. Other than that, maybe use WPF's VisualTreeHelper to find if there's a GlyphRunDrawing near the mouse position.

Regards,
Slavcho

Thanks, Slavcho!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint