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

[CS4|JS] Moving anchored Object doesn't change its geometricBounds

Guest
Sep 21, 2009 Sep 21, 2009

Copy link to clipboard

Copied

Hello Scripters,

in my Indesign document I have anchored objects as sidenotes, sometimes they're overlapping.

For this I am trying to move them as long as they still overlap, I used the following script:

myInlineRectangles.move(undefined, [0, -2]);

I've put that line into a while loop to move the object (until it doesn't overlap).

It does work, it moves the object (although I read that this is not possible). The only problem is that the geometricBounds stay the same.

As I am comparing the geometricBounds in my "while-condition" it ends in an endless loop.

Why does the object doesn't change its geometricBounds after moving?

How to avoid that?

Thanks a lot in advance for any answer.

Franzi_ska

TOPICS
Scripting

Views

1.2K

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

correct answers 1 Correct answer

Deleted User
Sep 22, 2009 Sep 22, 2009

Hi franzi_ska,

You'll need to tell the story containing the anchored object to recompose to get the new geometric bounds (after each move, and assuming that the anchored object can, in fact, move).

Thanks,

Ole

Votes

Translate

Translate
Guide ,
Sep 21, 2009 Sep 21, 2009

Copy link to clipboard

Copied

Maybe the anchored object cannot move no more beyond a specific position (and reaches this position before the loop-end condition satisfied).

For instance, if you have anchoredObjectSetting.pinPosition set to true and moves iteratively the object along the y-axis, you will reach a point where move(undefined, [0, -2]) has no more effect, resulting in invariant geometricBounds.

Maybe...

@+

Marc

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
Guest
Sep 21, 2009 Sep 21, 2009

Copy link to clipboard

Copied

hello marc,

thanks for your answer.

In my anchoredObjectSettings I only set the Option Keep Within Top/Bottom Column Boundaries (as true).

That's why the object is moved until a certain point and then the movement has no effect.

In fact the object is moved and the overlapping is compensated many times.

if I have look into the indesign document while running the script, the object in fact moves.

for this i don't see a reason why the geometricbounds do not change because of this?

thanks.

franzi_ska

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
Guest
Sep 22, 2009 Sep 22, 2009

Copy link to clipboard

Copied

Hi franzi_ska,

You'll need to tell the story containing the anchored object to recompose to get the new geometric bounds (after each move, and assuming that the anchored object can, in fact, move).

Thanks,

Ole

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
Guest
Sep 23, 2009 Sep 23, 2009

Copy link to clipboard

Copied

Hi Ole,

I tried what you suggested and it works!

Thanks a lot for that!

Regards, franzi

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
Guest
Sep 23, 2009 Sep 23, 2009

Copy link to clipboard

Copied

LATEST

Hi Ole,

I tried what you suggested and it works!

Thanks a lot for that!

Regards, franzi

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