Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's what I'd like to do.

textLayer.textItem.position[0] = 200;

I would expect this to change the x-coordinate of the text box to 200px from the canvas origin. The value does not get assigned. Anybody know what I'm missing?

share|improve this question

I can recreate your scenario and I am not sure why it behaves this way. However, the following workaround is possible:

var y = textLayer.textItem.position[1];
textLayer.textItem.position = [200, y];

For some reason, the individual values of the UnitValue array are not mutable and we have to set position as a new array.

share|improve this answer
Thanks man! I'll use this workaround for now. – Grant Jun 3 '13 at 19:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.