mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-24 10:27:00 -06:00
M1: frame guides (#70)
Ruler guides can belong to a frame: `guide.add/move/remove/clear` take `frame` (as well as `page`), keeping the guide in the frame's own coordinates. Frame guides move with the frame, span only it on the canvas, are saved and copied with it, and snap the layers inside it. A guide dragged out of a ruler and dropped on a frame becomes that frame's guide; its label shows the offset in the frame. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -329,6 +329,14 @@ closing or saving a version ends the preview first, and `version.list` marks the
|
||||
has unsaved changes since its last version; the app runs it every 30 minutes for each open document,
|
||||
and a file keeps the newest 20 autosaves (user versions are never dropped for them). `file.versionHistory` returns the same list and opens the panel in the app.
|
||||
|
||||
### Ruler guides
|
||||
|
||||
`guide.add {vertical, offset, frame? | page?}` (returns `{index}`), `guide.move {index, offset, …}`,
|
||||
`guide.remove {index, …}` and `guide.clear {…}` edit the guides of the current page, another
|
||||
`page`, or a `frame` (frames, components and instances). A frame's guides are in its own
|
||||
coordinates: they move with the frame, span only it, are copied with it and snap the layers inside
|
||||
it. In the app, a guide dragged out of a ruler and dropped on a frame becomes that frame's guide.
|
||||
|
||||
Tool failures come back as results with `isError: true` and a message; protocol problems (unknown
|
||||
tool, malformed JSON, wrong parameter types) are JSON-RPC errors. Nothing crashes the server.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user