0 Replies Latest reply on Mar 7, 2013 3:25 AM by charanseeram

    Placing Mutiple Images as an offset over pastebord

    charanseeram Level 1

      if(myDocument.rectangles.length == 0){

      rectframe=myDocument.rectangles.add();                       

      rectframe.label = file.name;

      rectframe.geometricBounds=[0,-375, 200, -118];//top, left, bottom, right

      geometricBoundsTop = 20;

      geometricBoundsLeft = 355;

      geometricBoundsBottom = 220;

      geometricBoundsRight = 98;

      rectframe.place(file);

      rectframe.fit(FitOptions.proportionally);

      } else{

      rectframe=myDocument.rectangles.add();

      rectframe.label = file.name;

      rectframe.geometricBounds=[geometricBoundsTop,-geometricBoundsLeft, geometricBoundsBottom, -geometricBoundsRight];

      geometricBoundsLeft-=20;

      geometricBoundsTop+=20;

      geometricBoundsBottom+=20;

      geometricBoundsRight-=20;

      rectframe.place(file);

      rectframe.fit(FitOptions.proportionally);

      }

      -My objective is to place mutiple images from my plugin  as an offset over Id paste board  (avoding overlap on one other) .

      -Am missing one condition to check when user move those placed assets at his desirable postions  over document am still need to place them at [0,-375,200,-118] .

      -I am trying to use modified property as flag to check condition but this modified property is allways true .

      Can some one assist me on this.