Reply To: Pasting images from frame to frame without loss of positioning data

Home Page / Forums / General InDesign Topics (CLOSED) / Pasting images from frame to frame without loss of positioning data / Reply To: Pasting images from frame to frame without loss of positioning data

#1252983
Max Pinton
Participant

I wonder if the resolve method could be coaxed to return the coordinates relative to the frame. This is from page 121 of the CS6 Scripting Guide. The other CoordinateSpaces they mention that seem promising are CoordinateSpaces.parentCoordinates and CoordinateSpaces.innerCoordinates:

Resolving locations

Sometimes, you need to get the location of a point specified in one coordinate space in the context of another coordinate space. To do this, use the resolve method, as shown in the following script example. (For the complete script, see ResolveLocation.)

var myPageLocation = myRectangle.resolve([[72, 72], AnchorPoint.topRightAnchor], CoordinateSpaces.pasteboardCoordinates, true);
//resolve() returns an array containing a single item.
alert(“X: ” + myPageLocation[0][0] + “\rY: ” + myPageLocation[0][1]);

This article was last modified on May 30, 2020

Comments (0)

Loading comments...