mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-30 21:36:46 -06:00
M3: component properties keep their order on rename; Make slot asks for the name (#1536, #1537) (#1565)
Properties were listed by name, so a rename moved one. Components now keep prop_order (the names as they were made; a rename keeps the place) and every listing follows it. Make slot opens a name field under the frame's Slot row; Enter makes the slot, Escape cancels, a taken name keeps the field open.
This commit is contained in:
+3
-1
@@ -958,7 +958,9 @@ remove and reorder layers there, unlike the rest of an instance). It is a compon
|
||||
`value: {layer, edited, layers}`).
|
||||
|
||||
- **Define** (on the main): `component.makeSlot {id (a frame inside a main component), name?,
|
||||
preferred? [component or set ids]}` (the property is named after the frame by default);
|
||||
preferred? [component or set ids]}` (the property is named after the frame by default; a new
|
||||
property goes last, as `component.properties` lists them in the order they were made, a rename
|
||||
keeping the place);
|
||||
`component.editProperty {name, preferred}`; `component.removeSlot {id}` (instances lose their own
|
||||
content in it). `component.addProperty {type: "slot", layer}` and `component.bindProperty {field:
|
||||
"slot"}` work too (one frame per component for a slot).
|
||||
|
||||
Reference in New Issue
Block a user