mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-14 22:35:26 +00:00
New Object Style: the selected object's corners as named corners
With #1455's named style corners merged, the dialog seeds the style's corners from the selected item through `path_to_named`, so a frame whose path runs in another order gives each corner its own options. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4a34c08c47
commit
496b2fe4dc
1 file changed
+2
-1
@@ -29,7 +29,8 @@ pub fn open_new(app: &mut DesignApp) {
|
||||
"basedOn": designcraft_doc::NO_OBJECT_STYLE,
|
||||
"fill": it.as_ref().map(|i| i.fill.clone()).unwrap_or_default(),
|
||||
"stroke": it.as_ref().map(|i| i.stroke.clone()).unwrap_or_default(),
|
||||
"corners": it.as_ref().map(|i| i.corners).unwrap_or_default(),
|
||||
// A style holds named corners (top left, top right, …), the item its path's.
|
||||
"corners": it.as_ref().map(|i| i.corners.path_to_named(&i.path)).unwrap_or_default(),
|
||||
"fx": crate::effects_dialog::effects_json(&it.map(|i| i.effects).unwrap_or_default()),
|
||||
"hadEffects": from,
|
||||
"inc": {"fill": from, "stroke": from, "corners": from},
|
||||
|
||||
Reference in new issue
Block a user