• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

how to coding :) [get Clipping Mask visible bounds]

Explorer ,
Sep 10, 2022 Sep 10, 2022

Copy link to clipboard

Copied

25976853bt3d_0-1662565539978.png

 

TOPICS
Scripting

Views

163

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guide ,
Sep 10, 2022 Sep 10, 2022

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:

  • group (selection 0)
    • group, clipped (selection 0.group 0)
      • red path (selection 0.group 0.path 0)
      • yellow path (selection 0.group 0.path 1)
    • green path (selection 0.path 0)

 

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];

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 10, 2022 Sep 10, 2022

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

🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Sep 10, 2022 Sep 10, 2022

Copy link to clipboard

Copied

LATEST

@冯25976853bt3d  Rather than repeat the question, you need to clarify the question and the premises that underlie the question. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 10, 2022 Sep 10, 2022

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines