Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to change size of ShapeNode with a same scaling? (Read 3419 times)
ncepu
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 25
Joined: Mar 5th, 2012
How to change size of ShapeNode with a same scaling?
Mar 6th, 2012 at 12:37pm
Print Post  
How to change size of ShapeNode with a same scaling?
e.g. How to change the size of a square,but not change the  ratio when I change the ShapeNode?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to change size of ShapeNode with a same scaling?
Reply #1 - Mar 6th, 2012 at 12:58pm
Print Post  
Set node.Constraints.KeepRatio.

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


I Love MindFusion!

Posts: 25
Joined: Mar 5th, 2012
Re: How to change size of ShapeNode with a same scaling?
Reply #2 - Mar 6th, 2012 at 1:54pm
Print Post  
I am sorry!
I still have a question,the code of you told me is the C# code,I want the javascript code.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to change size of ShapeNode with a same scaling?
Reply #3 - Mar 6th, 2012 at 3:24pm
Print Post  
node.getConstraints().setKeepRatio(true);

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


I Love MindFusion!

Posts: 25
Joined: Mar 5th, 2012
Re: How to change size of ShapeNode with a same scaling?
Reply #4 - Mar 7th, 2012 at 1:10am
Print Post  
public NodeConstraints getConstraints ()
This is the getConstraints function.

But I still can not find the setKeepRatio(true)function in  NodeConstraints class.
Thank you very much!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to change size of ShapeNode with a same scaling?
Reply #5 - Mar 7th, 2012 at 6:44am
Print Post  
What version of the control are you using? This method was added to Java mode with the NetDiagram V4.1 release.
  
Back to top
 
IP Logged
 
ncepu
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 25
Joined: Mar 5th, 2012
Re: How to change size of ShapeNode with a same scaling?
Reply #6 - Mar 7th, 2012 at 8:24am
Print Post  
Thank you for reminding me!My version is not v4.1.
That is extremely helpfull!!
Thanks a lot!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint