Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic setImageAlign (Read 2069 times)
billcollis
YaBB Newbies
*
Offline


I love mindfusion

Posts: 19
Location: Auckland, NZ
Joined: Jun 4th, 2011
setImageAlign
Apr 29th, 2015 at 12:31am
Print Post  
The way I am using setImageAlign it seems to be aligning to the diagram and not the node
Am I using it correctly?
Thanks

var node = new MindFusion.Diagramming.ShapeNode(diagram);
    node.setShape("Rectangle");
    node.setImageLocation("myimage.png");
    node.setBounds(new Rect(40, 40, 55, 114));
    node.setImageAlign("Stretch"); //"Fit" and all other options seem to make no difference
    diagram.addItem(node);
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: setImageAlign
Reply #1 - Apr 29th, 2015 at 6:39am
Print Post  
It doesn't take a string value, try this instead:

Code
Select All
var ImageAlign = MindFusion.Diagramming.ImageAlign;
...
node.setImageAlign(ImageAlign.Stretch); 



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


I love mindfusion

Posts: 19
Location: Auckland, NZ
Joined: Jun 4th, 2011
Re: setImageAlign
Reply #2 - Apr 29th, 2015 at 7:20pm
Print Post  
Thank you!
I am beginning to get used to javascript but I think I still have a long way to go.
I hope to be able to write an online version of the application I created for students using WinForms
Bill

Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint