Skip to content

Studio Script Reference: Reorder actions

These actions change the z-order (stacking order) of layers within their parent.

context.actions.zMoveAbove()

Moves the current layer directly above a sibling layer.

Example:

js
context.actions.zMoveAbove({
  source: 'dc61dc36-b0f4-4dc9-a9a8-7f4ec0088ac7'
});

context.actions.zMoveBelow()

Moves the current layer directly below a sibling layer.

Example:

js
context.actions.zMoveBelow({
  source: 'dc61dc36-b0f4-4dc9-a9a8-7f4ec0088ac7'
});

context.actions.zMoveToBottom()

Moves the current layer to the bottom of its parent.

Example:

js
context.actions.zMoveToBottom();

context.actions.zMoveToIndex()

Moves the current layer to a specific index within its parent.

Example:

js
context.actions.zMoveToIndex({ zIndex: 2 });

context.actions.zMoveToTop()

Moves the current layer to the top of its parent.

Example:

js
context.actions.zMoveToTop();