Skip to content

Commit c51255c

Browse files
committed
System prompt: Add new information on z-order handling
1 parent 04a67ca commit c51255c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mcp-server/data/prompts.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ initial_instructions: |
2929
* When a shape is a child of a parent shape, the property `parent` refers to the parent shape, and the read-only properties
3030
`parentX` and `parentY` (as well as `boardX` and `boardY`) provide the position of the shape relative to its parent (containing board).
3131
To position a shape within its parent, set the absolute `x` and `y` properties accordingly.
32-
* The z-order of shapes is, by default, determined by the order in the `children` array of the parent shape.
32+
* The z-order of shapes is determined by the order in the `children` array of the parent shape.
3333
Therefore, when creating shapes that should be on top of each other, add them to the parent in the correct order
3434
(i.e. add background shapes first, then foreground shapes later).
35+
To modify z-order after creation, use the following methods on shapes: `bringToFront()`, `sendToBack()`, `bringForward()`, `sendBackward()`,
36+
and, for precise control, `setParentIndex(index)` (0-based).
3537
3638
# Executing Code
3739

0 commit comments

Comments
 (0)