Page Index Toggle Pages: 1 [2]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Disable node resizing (Read 15155 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable node resizing
Reply #15 - Mar 8th, 2009 at 10:52am
Print Post  
Hi Hai,

This is for your "user to be able to Drag the node on first click" requirement. Set this property to AutoHandles and this should work, without you having to handle mouse event and deal with the selection.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Hai
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 63
Joined: Jan 7th, 2009
Re: Disable node resizing
Reply #16 - Mar 9th, 2009 at 11:14am
Print Post  
Hi Stoyan

I've played with it a bit… it is cool but unfortunately it does not helping me…
What I need is:

1. When the user click on the node I want him to be able to drag it. Not only when he clicks in the middle… I'm fine with mouse events, is there a way to achieve this ?

2. I must get rid of the multi-selection rectangle… Have you checked it ? As I mentioned before it appears without pressing Ctrl and I do not use Modify.

3. The AllowMultiple will be on the coming version ?

The multiple selection (And the rectangle) are very problematic since I present info for the selected node. Multi-select mess me up…

Many Thanks
Hai
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable node resizing
Reply #17 - Mar 9th, 2009 at 2:39pm
Print Post  
Hi Hai,

At this time you could do that using a custom Behavior object. We'll upload a version with the AllowMultiple property tomorrow.

Stoyan
  
Back to top
 
IP Logged
 
Hai
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 63
Joined: Jan 7th, 2009
Re: Disable node resizing
Reply #18 - Mar 10th, 2009 at 2:14pm
Print Post  
Hi Stoyan

I cannot figure out how to create the CustomBehavior and how can it solve problems 1 and 2 from my previous post.

Will you be kind to give me a code snippet or sample ?

+ Is there an estimation on when the next version be released ?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable node resizing
Reply #19 - Mar 10th, 2009 at 4:12pm
Print Post  
Hi Hai,

This version adds diagram.Selection.AllowMultipleSelection property:
https://mindfusion.eu/_beta/diaglite_allowmultsel.zip

Set it to false to disable selecting multiple items.

I'll post sample custom behavior code tomorrow.

Stoyan
  
Back to top
 
IP Logged
 
Hai
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 63
Joined: Jan 7th, 2009
Re: Disable node resizing
Reply #20 - Mar 10th, 2009 at 4:42pm
Print Post  
Hi Stoyan

I can't find this property  ???

Checked my references
Restarted VisualStudio
Restarted my computer
Deleted and added again the reference

Can you please double-check that this property is there....

Thx

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable node resizing
Reply #21 - Mar 11th, 2009 at 10:34am
Print Post  
Hi Hai,

It is a property of the Selection class. You can set it like this:

diagram.Selection.AllowMultipleSelection = false;

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable node resizing
Reply #22 - Mar 11th, 2009 at 3:19pm
Print Post  
Hi Hai,

Get this version:
https://mindfusion.eu/_beta/diaglite_custbehavior.zip

Add a class that looks like this:
Code
Select All
public class MoveNodesBehavior : BehaviorBase
{
	public MoveNodesBehavior(Diagram diagram) : base(diagram)
	{
	}

	public override InteractionState StartDraw(Point point)
	{
		DiagramNode node = Diagram.GetNodeAt(point);
		if (node != null)
			return new InteractionState(node, Action.Modify, 8, point);

		return null;
	}
}
 



And set diagram.CustomBehavior = new MoveNodesBehavior(diagram);

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Hai
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 63
Joined: Jan 7th, 2009
Re: Disable node resizing
Reply #23 - Mar 12th, 2009 at 12:54pm
Print Post  
Thank you Stoyan, It seems like it did the trick...
One selection, move with a single click.

Many thx

Hai
  
Back to top
 
IP Logged
 
Hai
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 63
Joined: Jan 7th, 2009
Re: Disable node resizing
Reply #24 - Mar 15th, 2009 at 2:10pm
Print Post  
Hi Stoyan

We would like to contact you on the phone (if it is possible).
Can you please supply me with your office phone number and your working hours ?

Thank you

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable node resizing
Reply #25 - Mar 16th, 2009 at 8:55am
Print Post  
Hi Hai,

You can use the phone number listed here:
http://www.mindfusion.eu/contacts.html

If you are in IL, we should have almost the same working hours. We are at GMT+02.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint