- Welcome, Guest. Please Login or Register
MindFusion  
  We are soon releasing MindFusion.JavaScript pack. Initial version includes chart, diagram, calendar, map, virtual keyboard, gauge and UI components. Here are the beta version and live demo for anyone interested.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Drag diagram link by name
Read 310 times

lexeranddn   Offline
YaBB Newbies
*
Posts: 13
I Love MindFusion!


   
     
 
Drag diagram link by name
May 22nd, 2019 at 1:10pm
 
Is it possible to drag diagramlink by name?
Thanks
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1700
Gender: male
tech.support


   
     
 
Re: Drag diagram link by name
Reply #1 - May 22nd, 2019 at 2:35pm
 
Do you mean by grabbing its Text or LinkLabels? And then what would you expect  the drag operation to do?
 
 
 
IP Logged    
 
     

lexeranddn   Offline
YaBB Newbies
*
Posts: 13
I Love MindFusion!


   
     
 
Re: Drag diagram link by name
Reply #2 - May 22nd, 2019 at 2:54pm
 
Slavcho wrote on May 22nd, 2019 at 2: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
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1700
Gender: male
tech.support


   
     
 
Re: Drag diagram link by name
Reply #3 - May 23rd, 2019 at 9: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
 
 
 
IP Logged    
 
     

lexeranddn   Offline
YaBB Newbies
*
Posts: 13
I Love MindFusion!


   
     
 
Re: Drag diagram link by name
Reply #4 - May 23rd, 2019 at 11:02am
 
Slavcho wrote on May 23rd, 2019 at 9: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.
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1700
Gender: male
tech.support


   
     
 
Re: Drag diagram link by name
Reply #5 - May 23rd, 2019 at 2:32pm
 
But what should the drag operation do? Like move the whole link, the segment where text is located, or nearest control point?
 
 
 
IP Logged    
 
     

lexeranddn   Offline
YaBB Newbies
*
Posts: 13
I Love MindFusion!


   
     
 
Re: Drag diagram link by name
Reply #6 - May 23rd, 2019 at 3:32pm
 
Slavcho wrote on May 23rd, 2019 at 2: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
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1700
Gender: male
tech.support


   
     
 
Re: Drag diagram link by name
Reply #7 - May 24th, 2019 at 8: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
 
 
 
IP Logged    
 
     

lexeranddn   Offline
YaBB Newbies
*
Posts: 13
I Love MindFusion!


   
     
 
Re: Drag diagram link by name
Reply #8 - May 27th, 2019 at 2:14pm
 
Slavcho wrote on May 24th, 2019 at 8: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!
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print