Photoshop move layer along y-axis
问题 I'm working on a script that will move a layer, right, left, up, or down. This depends upon which edge of the layer is inside the canvas. I've managed to get the layer moving left and right (x-axis) using bounds[0] and bounds[2]. But when I try to get it to move up or down, it still moves left/right. Is it the bounds number I've got wrong? var Y1 = bounds[3].as('px'); var Height = app.activeDocument.height.as('px'); //move down if (Y1 < Height) { activeDocument.activeLayer.translate(Height-Y1