Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Relative movement between diagram and ShapeNode or ShapeNode and ShapeNode (Read 1057 times)
JackPan
Full Member
***
Offline


I Love MindFusion!

Posts: 134
Joined: Apr 9th, 2020
Relative movement between diagram and ShapeNode or ShapeNode and ShapeNode
Sep 10th, 2020 at 9:23am
Print Post  
Hi, Slavcho Smiley

I want to use the value of the TextBox or the arrow keys to control the movement of the ShapeNode in the diagram, so I need to define an origin coordinate (0,0) position, so that the midpoint of the ShapeNode is relative to the origin (0,0) position movement.

1. I want to set the position of the origin (0, 0) to the upper left corner of the diagram. How do I achieve this?

2. If the origin (0, 0) is set to the center point of another ShapeNode, it means that a ShapeNode moves with the center point of another ShapeNode as the origin. How do I achieve this?

Best regards.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: Relative movement between diagram and ShapeNode or ShapeNode and ShapeNode
Reply #1 - Sep 11th, 2020 at 4:46am
Print Post  
You can specify where 0,0 is located in the diagram by setting diagram.Bounds. Move node to coords - size / 2 as in https://mindfusion.eu/Forum/YaBB.pl?num=1598018807/4#4 to get a node centered at specific coordinates.

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