Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Keep shape's height unchange, or keep shape's width/height const ? (Read 2513 times)
GoldyWang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 34
Joined: May 7th, 2012
Keep shape's height unchange, or keep shape's width/height const ?
May 23rd, 2012 at 8:18am
Print Post  
I want shapeNode, keeping it's height or width unchanged, when resizing them interactively.
and other shapeNode, keeping them the width/height const,
how can i do it?

as the images shows in attachment.

(they are sticks, actually it is the petriNet transition notation)
  

sticks.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Keep shape's height unchange, or keep shape's width/height const ?
Reply #1 - May 23rd, 2012 at 9:34am
Print Post  
You could set respectively only the left/right, top/bottom, or move flags in node.EnabledHandles, or perhaps try setting MinHeight=MaxHeight and/or MinWidth=MaxWidth in node.Constraints.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
GoldyWang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 34
Joined: May 7th, 2012
Re: Keep shape's height unchange, or keep shape's width/height const ?
Reply #2 - May 23rd, 2012 at 10:23am
Print Post  
can we response some resizing event, to keep the width/height scale const ?

such as width/height =0.5,  so as keep the bound similar scale ?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Keep shape's height unchange, or keep shape's width/height const ?
Reply #3 - May 23rd, 2012 at 12:07pm
Print Post  
You can do that by setting node.Constraints.KeepRatio.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
GoldyWang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 34
Joined: May 7th, 2012
Re: Keep shape's height unchange, or keep shape's width/height const ?
Reply #4 - Jun 4th, 2012 at 2:33am
Print Post  
I not got the ture result till now, wu...

I want the shapeNode, be like a stick, the stick's width is const, and the stick and be extent longer, and can be shorten...

and the stick can be rotated..
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Keep shape's height unchange, or keep shape's width/height const ?
Reply #5 - Jun 4th, 2012 at 6:49am
Print Post  
This disables adjustment handles that can change the node's width, so only vertical resize, move and rotate handles will work:

Code
Select All
ShapeNode stick = diagram.Factory.CreateShapeNode(0, 0, 10, 60);
stick.EnabledHandles =
	AdjustmentHandles.All &
	~AdjustmentHandles.LeftHandles &
	~AdjustmentHandles.RightHandles;
 



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