3 Replies Latest reply on Jun 13, 2008 5:22 AM by (WellerUK)

    JS CS3 Change geometricBounds


      When I run:
      app.selection[0].geometricBounds = [0,0,10,10];
      everything works as expected.

      I only want to change the width so I tried:
      app.selection[0].geometricBounds[3] += 10;


      app.selection[0].geometricBounds[3] = app.selection[0].geometricBounds[3] + 10;
      nothing changes and no error message appears.

      I solved it in the following clumsy way eventually:

      a = app.selection[0].geometricBounds[0];
      b = app.selection[0].geometricBounds[1];
      c = app.selection[0].geometricBounds[2];
      d = app.selection[0].geometricBounds[3] + 10;

      app.selection[0].geometricBounds = [a,b,c,d];

      So it finally kind of works but it leaves me scratching my head. Is this really the way to do it?

      Thanks for clarification