Copy link to clipboard
Copied
Copy link to clipboard
Copied
Are you trying to read the position of the green path? Or are you trying to set the position of the group so that the position of the green path is, for example, (0, 0)?
Assuming your hierarchy is this:
To read the position of the green path:
alert(app.selection[0].pathItems[0].position);
To set the position of the group so that the position of the green path is, for example, (0, 0):
var X = app.selection[0].pathItems[0].position[0] - app.selection[0].position[0];
app.selection[0].position = [0 - X, 0];
Copy link to clipboard
Copied
set the position of the group to (0,0)
get position.x => -133 😞
i need
set the position of the group to (0,0)
get position.x => 0
get position.y => 0
🙂
Copy link to clipboard
Copied
@冯25976853bt3d Rather than repeat the question, you need to clarify the question and the premises that underlie the question.
Copy link to clipboard
Copied