mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-29 20:27:05 -06:00
M7.3: Area Type Options — rows, columns, gutter, inset, first baseline stored on area type, laid out by the text engine; Type → Area Type Options… dialog prefilled from the selection
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4d1eb16424
commit
f522e6bd3d
@@ -805,7 +805,7 @@ pub fn menu_tree() -> Vec<(&'static str, Vec<Item>)> {
|
||||
Sep,
|
||||
c("Convert To Area Type", "type.convertToAreaType"),
|
||||
c("Convert To Point Type", "type.convertToPointType"),
|
||||
todo("Area Type Options…"),
|
||||
c("Area Type Options…", "text.areaOptions"),
|
||||
sub(
|
||||
"Type on a Path",
|
||||
vec![
|
||||
@@ -1164,6 +1164,16 @@ pub fn invoke(app: &mut DrawcraftApp, id: &str, p: Value) {
|
||||
let _ = app.run("ui.paramDialog", json!({"command": id, "label": "Repeat Options", "params": fields}));
|
||||
return;
|
||||
}
|
||||
// Area Type Options: a dialog with the selected area type's current values.
|
||||
if id == "text.areaOptions" && p.as_object().is_none_or(|o| o.is_empty()) {
|
||||
match app.session.execute(id, &json!({})) {
|
||||
Ok(fields) => {
|
||||
let _ = app.run("ui.paramDialog", json!({"command": id, "label": "Area Type Options", "params": fields}));
|
||||
}
|
||||
Err(e) => app.status(e.to_string()),
|
||||
}
|
||||
return;
|
||||
}
|
||||
if let Err(e) = app.run(id, p) {
|
||||
app.status(e);
|
||||
} else if matches!(id, "object.pattern.make" | "object.pattern.edit") {
|
||||
|
||||
Reference in New Issue
Block a user