From c51255cbe0a40778b977d243669fccf001622eff Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Mon, 12 Jan 2026 13:50:30 +0100 Subject: [PATCH] System prompt: Add new information on z-order handling --- mcp-server/data/prompts.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mcp-server/data/prompts.yml b/mcp-server/data/prompts.yml index 976e93b..360642b 100644 --- a/mcp-server/data/prompts.yml +++ b/mcp-server/data/prompts.yml @@ -29,9 +29,11 @@ initial_instructions: | * When a shape is a child of a parent shape, the property `parent` refers to the parent shape, and the read-only properties `parentX` and `parentY` (as well as `boardX` and `boardY`) provide the position of the shape relative to its parent (containing board). To position a shape within its parent, set the absolute `x` and `y` properties accordingly. - * The z-order of shapes is, by default, determined by the order in the `children` array of the parent shape. + * The z-order of shapes is determined by the order in the `children` array of the parent shape. Therefore, when creating shapes that should be on top of each other, add them to the parent in the correct order (i.e. add background shapes first, then foreground shapes later). + To modify z-order after creation, use the following methods on shapes: `bringToFront()`, `sendToBack()`, `bringForward()`, `sendBackward()`, + and, for precise control, `setParentIndex(index)` (0-based). # Executing Code