M7.3: Type → Type on a Path effects (Rainbow, Skew, 3D Ribbon, Stair Step, Gravity): TextObject::path_effect, type.pathOptions {effect}, checked menu items

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-01 22:21:58 -04:00
co-authored by Claude Opus 5.5
parent 8434ef4404
commit 0ae572be93
8 changed files with 139 additions and 13 deletions
+14 -5
View File
@@ -400,6 +400,15 @@ pub fn checked(app: &VectorcraftApp, id: &str, p: &Value) -> Option<bool> {
"view.outline" => v.outline,
"view.pixelPreview" => v.pixel_preview,
"view.trimView" => v.trim_view,
// Type on a Path effect of the selected path type.
"type.pathOptions" if p.get("effect").is_some() => {
let st = app.session.active()?;
let t = st.selection.objects.iter().find_map(|id| match st.doc.node(*id).map(|n| &n.kind) {
Some(vectorcraft_engine::doc::NodeKind::Text(t)) if matches!(t.kind, vectorcraft_engine::doc::TextKind::OnPath { .. }) => Some(t),
_ => None,
})?;
p.get("effect").and_then(Value::as_str) == Some(t.path_effect.id())
}
"view.smartGuides" => v.smart_guides,
"view.grid" => v.grid,
"view.snapToGrid" => v.snap_to_grid,
@@ -826,11 +835,11 @@ pub fn menu_tree() -> Vec<(&'static str, Vec<Item>)> {
sub(
"Type on a Path",
vec![
todo("Rainbow"),
todo("Skew"),
todo("3D Ribbon"),
todo("Stair Step"),
todo("Gravity"),
cp("Rainbow", "type.pathOptions", json!({"effect": "rainbow"})),
cp("Skew", "type.pathOptions", json!({"effect": "skew"})),
cp("3D Ribbon", "type.pathOptions", json!({"effect": "3dRibbon"})),
cp("Stair Step", "type.pathOptions", json!({"effect": "stairStep"})),
cp("Gravity", "type.pathOptions", json!({"effect": "gravity"})),
Sep,
cp("Type on a Path Options…", "type.pathOptions", json!({"start": 0})),
],