Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Selective AutoSnap to objects (Read 1547 times)
jf2020
Junior Member
**
Offline


I love FlowChart!

Posts: 63
Joined: Feb 23rd, 2006
Selective AutoSnap to objects
Apr 15th, 2013 at 10:58am
Print Post  
I'm trying to start using the AutoAlignNodes and it works fine. I have added temporarily disabling it when pressing Alt key so that's OK.

Now here's my issue: On our diagrams each object is a group of nodes and the auto align is kicking in for all nodes (even the ones that are locked in the group) which makes the feature quite difficult to use. So how can I:

- exclude completely some nodes from being looked at by the algorithm (that would be the case for some locked nodes that we use as indicators icons next to the main node,
- selectively exclude some nodes based on teh selected node. This is needed because in our diagrams the label (text) of the main object is a node that the user can move. So the behaviour would be as follows: when moving a main node only try to snap to other main nodes, when moving the subordinate label node allow snaping to any node (but the locked ones) as the user can be then then trying to align the text.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Selective AutoSnap to objects
Reply #1 - Apr 15th, 2013 at 1:49pm
Print Post  
You can't exclude nodes with the public API at this time. We'll try to add some property or validation event in the next version to let you do that. If using a custom build of the control, you can edit the internal GetNodesInViewport method to skip locked nodes.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Selective AutoSnap to objects
Reply #2 - May 21st, 2013 at 12:38pm
Print Post  
This version adds a QueryAlignTarget event to let you filter out some nodes as alignment guide targets:

https://mindfusion.eu/_beta/fcnet_aligntarget.zip

Set e.Cancel = true when you want to ignore a node. If that depends on the current node being modified, you can access it via diagram.Interaction.CurrentItem.

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