Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Non rectangular selection (Read 2807 times)
Sabrina C.
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 35
Joined: Dec 20th, 2012
Non rectangular selection
Feb 20th, 2016 at 2:42pm
Print Post  
Hi, we are successfully using MindFusion for our project.

Recently, since the complexity of our diagrams is increasing, we need the ability to select nodes by creating arbitrary polygons, and specifying the points of the polygon with the mouse (a polygonal lasso selection tool) while pressing a keyboard modifier.

We saw that in the version 3.4 beta you've added the Free-form nodes. Can a selection be specified in a similar way? Or can you suggest a strategy or provide an example on how to do that, even by leveraging the free form nodes?

We have the licensed version of the diagramming library, is there the possibility to download a licensed version of the 3.4 beta?

Thanks in advance, Sabrina
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Non rectangular selection
Reply #1 - Feb 20th, 2016 at 3:59pm
Print Post  
Hello Sabrina,

We'll keep this in mind as a new selection style for next release. At this time you could use FreeFormNode as a selection tool by setting Behavior to DrawFreeForm and selecting items from NodeCreated event -

Code
Select All
private void OnNodeCreated(object sender, NodeEventArgs e)
{
	var lassoTool = e.Node as FreeFormNode;
	if (lassoTool != null)
	{
		var lassoPoints = lassoTool.Points.Select(p => p.ToPoint()).ToArray();
		var selected = diagram.Nodes.Where(
			n => Utilities.PointInPolygon(lassoPoints, n.GetCenter()));

		diagram.Selection.Clear();
		foreach (var node in selected)
			node.Selected = true;

		diagram.Nodes.Remove(lassoTool);
	}
} 



Quote:
We have the licensed version of the diagramming library, is there the possibility to download a licensed version of the 3.4 beta?


We no longer build separate licensed configurations of the diagram assemblies, instead you assign license key to the control. If you still have active upgrade subscription your most current license key string should work for v3.4 too.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Sabrina C.
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 35
Joined: Dec 20th, 2012
Re: Non rectangular selection
Reply #2 - Feb 22nd, 2016 at 8:39am
Print Post  
Hi, thanks for the workaround.

With respect to the version 3.4 beta we're experiencing a strange issue. in One of our PC with Visual studio 2015, with the same identical settings and source control, the load of the assemblies fails during compilation and the error returned by the compiler is:

LC : error LC0000: 'Could not load file or assembly 'MindFusion.Diagramming.Wpf, Version=3.0.4.27502, Culture=neutral, PublicKeyToken=1080b51628c81789' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)'

In the same PC, the V 3.3.1 is working fine. I've tried to rollback MindFusion dll to the latest stable and the compiler stops complaining. Do you have any clue?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Non rectangular selection
Reply #3 - Feb 22nd, 2016 at 8:51am
Print Post  
Hi,

Try deleting the diagram line from licenses.licx file. We no longer use design-time licenses, for which this file is used for by Visual Studio. Also you no longer have to install the control or export and import registry keys on all systems where you need to compile - you must only copy the mindfusion.* assemblies.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Sabrina C.
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 35
Joined: Dec 20th, 2012
Re: Non rectangular selection
Reply #4 - Feb 22nd, 2016 at 9:03am
Print Post  
Great. That was the problem. I completely removed the licx file from the Properties. Very strange that in all the others PCs it was ignored.

Thanks.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Non rectangular selection
Reply #5 - Jun 22nd, 2016 at 5:23pm
Print Post  
This build adds initial implementation of non-rectangular selection -
https://mindfusion.eu/_temp/freeform_selection.zip

Set diagram.Selection.FreeFormMode = true to enable it.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint