Move Layer
photopea_move_layerMove a layer by relative x/y offset in pixels. Specify target layer by name or index, and provide horizontal (positive right) and vertical (positive down) offsets to reposition from current location.
Instructions
Translate a layer by a relative x/y offset in pixels from its current position. Positive x moves right, positive y moves down. Use get_layers to check current layer bounds, or transform_layer for scaling and rotation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Layer name (string) or index (number) | |
| x | Yes | Horizontal offset in pixels (positive = right, negative = left) | |
| y | Yes | Vertical offset in pixels (positive = down, negative = up) |