Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

Move object by "Reference Point"

$
0
0

I need to move images on my document using different reference points. But it looks like by default, it's moving them using the "AnchorPoint.TOP_LEFT_ANCHOR". I can't seem to change it.

 

Here's my code:

 

var myDoc = app.activeDocument;

var changeRefPoint = app.activeWindow.transformReferencePoint = AnchorPoint.TOP_RIGHT_ANCHOR;

if(myDoc.selection.length == 1)

{

      if (app.selection[0].constructor.name == "Rectangle")

     {

          var rectangle_graph = app.selection[0].move([159,61.3]);

     }

}


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>