#801: create_node and mcp.md say width/height scale a vector's path

This commit is contained in:
bflatastic
2026-10-18 17:54:25 +07:00
parent f1d336249a
commit 057bf9a289
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ pub fn tool_definitions() -> Vec<Value> {
"type": {"type": "string", "enum": ["frame", "rectangle", "ellipse", "polygon", "star", "line", "arrow", "text", "vector", "section", "component", "slice"], "description": "Layer type"},
"x": num("Left, relative to the parent frame (default 0)"),
"y": num("Top, relative to the parent frame (default 0)"),
"width": num("Width (default 100; text hugs its content unless width is set, which makes it wrap)"),
"width": num("Width (default 100; text hugs its content unless width is set, which makes it wrap; for a vector with path, width/height scale the path, one alone keeping its proportion, and without them the path's own box is used)"),
"height": num("Height (default 100; ignored for lines/arrows and auto-height text)"),
"parent": id_schema("Parent frame/group/component id (default: the current page)"),
"index": int("Z-index among the parent's children (default: on top)"),
+2 -2
View File
@@ -429,8 +429,8 @@ on; `key` resolves keys the way the canvas does. Commands behind keys:
`vector.create {path | points}` makes the layer's box from the geometry; `width`/`height` scale
the geometry to the size asked for (with both, each side independently; with one, the other keeps
its proportion). A path or point set that draws nothing is refused instead of making an invisible
0×0 layer, as is a size on an axis the geometry has none of and a size that would collapse both
axes.
0×0 layer, as is a size on an axis the geometry has none of (except 0, such as a horizontal line's
height) and a size of 0 or less on an axis it has, which would flatten it.
Vector edit mode is driven with `run_command` (or `pointer`/`key` for gestures):
`vector.edit.begin {id? | ids?}` (default the selection; converts shapes to vectors; several layers