From 76705afc2ff5ba0640da4d1682e712fa4fa8a792 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 15:01:52 -0800 Subject: [PATCH] Dimension: leave a null arrowHead out of saved options Saved and recorded dimension options carried "arrowHead": null even without a stroke head, so a recorded dimension.create failed in versions that do not know the option. The field is now left out when it is null. dimension.create, dimension.update and Dimension Tool Options still take it. The name is read without a copy of its own, and a name longer than any built-in one is refused before it is parsed. Through ui.dialog.set, an arrowStyle set in Dimension Tool Options clears arrowHead, and a built-in arrowHead sets the arrowStyle of its Arrow Style entry, as that menu does. The Arrow Style field reads only a built-in head's name from a draft. The Stroke panel and Arrow Style look up a built-in arrowhead's name in the catalog's arrowhead rows first, then its plain row. Every complete catalog gets an arrowhead row for Feather, so the Feather arrowhead is named as an arrowhead in each, and the de, gu, it, ja, ko, uk, vi, zh-hans and zh-hant catalogs no longer show it in English. Versions that have the stroke arrowhead but do not read arrowHead keep a dimension's saved arrows until they draw the dimension again, and then draw arrowStyle; versions without the stroke arrowhead do not open the file. The params text, the doc comments, docs/dimensions.md, docs/mcp.md and docs/target-app-parity.md say so. The French Line Arrow row moves next to the other rows of its block. --- crates/doc/src/dimension.rs | 54 +++++++++++++++++----- crates/engine/src/cmd/dimension.rs | 2 +- crates/engine/tests/it/dimensions.rs | 12 +++-- crates/ui-egui/src/dialogs.rs | 5 ++ crates/ui-egui/src/dialogs/dimension.rs | 61 +++++++++++++++++++++++-- crates/ui-egui/src/i18n/bg.tsv | 1 + crates/ui-egui/src/i18n/bs.tsv | 1 + crates/ui-egui/src/i18n/ca.tsv | 1 + crates/ui-egui/src/i18n/cs.tsv | 1 + crates/ui-egui/src/i18n/da.tsv | 1 + crates/ui-egui/src/i18n/de.tsv | 1 + crates/ui-egui/src/i18n/el.tsv | 1 + crates/ui-egui/src/i18n/es.tsv | 1 + crates/ui-egui/src/i18n/fi.tsv | 1 + crates/ui-egui/src/i18n/fr.tsv | 3 +- crates/ui-egui/src/i18n/gu.tsv | 1 + crates/ui-egui/src/i18n/hi.tsv | 1 + crates/ui-egui/src/i18n/hu.tsv | 1 + crates/ui-egui/src/i18n/id.tsv | 1 + crates/ui-egui/src/i18n/it.tsv | 1 + crates/ui-egui/src/i18n/ja.tsv | 1 + crates/ui-egui/src/i18n/ka.tsv | 1 + crates/ui-egui/src/i18n/ko.tsv | 1 + crates/ui-egui/src/i18n/nl.tsv | 1 + crates/ui-egui/src/i18n/pl.tsv | 1 + crates/ui-egui/src/i18n/pt-br.tsv | 1 + crates/ui-egui/src/i18n/ru.tsv | 1 + crates/ui-egui/src/i18n/sv.tsv | 1 + crates/ui-egui/src/i18n/tests.rs | 10 ++-- crates/ui-egui/src/i18n/tr.tsv | 1 + crates/ui-egui/src/i18n/uk.tsv | 1 + crates/ui-egui/src/i18n/vi.tsv | 1 + crates/ui-egui/src/i18n/zh-hans.tsv | 1 + crates/ui-egui/src/i18n/zh-hant.tsv | 1 + crates/ui-egui/src/panels/stroke.rs | 8 +++- docs/dimensions.md | 4 +- docs/mcp.md | 4 +- docs/target-app-parity.md | 2 +- 38 files changed, 164 insertions(+), 28 deletions(-) diff --git a/crates/doc/src/dimension.rs b/crates/doc/src/dimension.rs index 42b6b9a76d..4d66f5d74c 100644 --- a/crates/doc/src/dimension.rs +++ b/crates/doc/src/dimension.rs @@ -128,17 +128,45 @@ impl ArrowStyle { /// it). A custom arrowhead and an unknown name are refused. mod arrow_head { use crate::Arrowhead; - use serde::de::{Error, IntoDeserializer}; + use serde::de::{Error, IntoDeserializer, Visitor}; use serde::{Deserialize, Deserializer}; pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result, D::Error> { - let Some(name) = Option::::deserialize(deserializer)? else { return Ok(None) }; - let parsed: Result = Arrowhead::deserialize(name.as_str().into_deserializer()); - match parsed { - Ok(head) if !matches!(head, Arrowhead::Custom(_)) => Ok(Some(head)), - _ => { - let shown: String = name.chars().take(64).collect(); - Err(D::Error::custom(format!("Unknown arrowhead {shown}: a built-in stroke arrowhead name or null"))) + deserializer.deserialize_option(Name) + } + + /// Reads the name where it is, without a copy of its own. + struct Name; + + impl<'de> Visitor<'de> for Name { + type Value = Option; + + fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.write_str("a built-in stroke arrowhead name or null") + } + + fn visit_none(self) -> Result { + Ok(None) + } + + fn visit_unit(self) -> Result { + Ok(None) + } + + fn visit_some>(self, deserializer: D) -> Result { + deserializer.deserialize_str(self) + } + + fn visit_str(self, name: &str) -> Result { + // No built-in name is this long, so a longer one is refused without parsing it. + let parsed: Result = + if name.len() > 64 { Err(serde::de::value::Error::custom("too long")) } else { Arrowhead::deserialize(name.into_deserializer()) }; + match parsed { + Ok(head) if !matches!(head, Arrowhead::Custom(_)) => Ok(Some(head)), + _ => { + let shown: String = name.chars().take(64).collect(); + Err(E::custom(format!("Unknown arrowhead {shown}: a built-in stroke arrowhead name or null"))) + } } } } @@ -177,8 +205,11 @@ pub struct DimensionOptions { pub line_type: LineType, pub line_color: [u8; 3], pub arrow_style: ArrowStyle, - /// A built-in stroke arrowhead drawn at both ends in place of `arrow_style`'s head. - #[serde(deserialize_with = "arrow_head::deserialize")] + /// A built-in stroke arrowhead drawn at both ends in place of `arrow_style`'s head. Versions + /// that have the stroke arrowhead but do not read this keep the saved arrows until they draw + /// the dimension again, and then draw `arrow_style`. Versions without the stroke arrowhead do + /// not open the file. + #[serde(deserialize_with = "arrow_head::deserialize", skip_serializing_if = "Option::is_none")] pub arrow_head: Option, pub arrow_scale: f64, pub extension_weight: f64, @@ -233,7 +264,8 @@ impl DimensionOptions { /// tolerantly so a newer version's options don't stop a document opening. pub fn from_params(v: serde_json::Value) -> Result { if let (Some(given), Ok(serde_json::Value::Object(known))) = (v.as_object(), serde_json::to_value(Self::default())) - && let Some(k) = given.keys().find(|k| !known.contains_key(*k)) + // `arrowHead` is left out of the saved options when it is null. + && let Some(k) = given.keys().find(|k| !known.contains_key(*k) && k.as_str() != "arrowHead") { return Err(format!("Unknown dimension option {k}")); } diff --git a/crates/engine/src/cmd/dimension.rs b/crates/engine/src/cmd/dimension.rs index 680511b2aa..e38f8f99bb 100644 --- a/crates/engine/src/cmd/dimension.rs +++ b/crates/engine/src/cmd/dimension.rs @@ -14,7 +14,7 @@ pub fn specs() -> Vec { "Create Dimension", [], None, - "{mode?: linear|angular|radius|diameter, a?: [x,y], b?: [x,y], vertex?: [x,y], source?: {kind: segment, edge: {node,subpath,segment}}|{kind: angle, first: edge, second: edge}|{kind: circle, node}|{kind: arc, edge}|{kind: points, a?, b?, vertex?: {node,subpath,anchor}, freeA?, freeB?: a point that is not an anchor, {kind: onSegment, edge: {node,subpath,segment}, t: 0..1 (curve parameter)}|{kind: anchors, node, anchors: [{subpath,anchor,part?: point|in|out (the anchor, default, or its in or out handle),weight}] (2 or 3 points of one path whose weights add up to 1), across?: (2 anchors only: times the first-to-second anchor vector (x,y) turned to (-y,x), which points down when the vector points right)} (an end is an anchor or a free point, not both)}, orientation?: aligned|horizontal|vertical (linear only: the distance between the points, or only its horizontal or vertical part; default aligned), offset?: pt (the line's distance from the first point: along the left normal of a → b when aligned, downward when horizontal, leftward when vertical; negative goes the other way), options?: {units: in|mm|pt|pc|px|cm|m|ft|yd, precision: 0-6, scale: drawing:real, hideUnits, lineWeight, lineType: solid|dashed|dotted, lineColor: [r,g,b], arrowStyle: filled|open|tick|none, arrowHead: null|a built-in stroke.set arrowhead name (Barbed, LineArrow…; drawn at both ends in place of arrowStyle's head; custom arrowheads are refused), arrowScale: %, extensionWeight, extensionType, extensionColor, extensionOffset, extensionLength, hideExtensions, fontFamily, fontStyle, fontSize, textColor, textPosition: away|between, textAlignment: left|center|right, textOffset}} → {id,label}; linked measurements follow source edits", + "{mode?: linear|angular|radius|diameter, a?: [x,y], b?: [x,y], vertex?: [x,y], source?: {kind: segment, edge: {node,subpath,segment}}|{kind: angle, first: edge, second: edge}|{kind: circle, node}|{kind: arc, edge}|{kind: points, a?, b?, vertex?: {node,subpath,anchor}, freeA?, freeB?: a point that is not an anchor, {kind: onSegment, edge: {node,subpath,segment}, t: 0..1 (curve parameter)}|{kind: anchors, node, anchors: [{subpath,anchor,part?: point|in|out (the anchor, default, or its in or out handle),weight}] (2 or 3 points of one path whose weights add up to 1), across?: (2 anchors only: times the first-to-second anchor vector (x,y) turned to (-y,x), which points down when the vector points right)} (an end is an anchor or a free point, not both)}, orientation?: aligned|horizontal|vertical (linear only: the distance between the points, or only its horizontal or vertical part; default aligned), offset?: pt (the line's distance from the first point: along the left normal of a → b when aligned, downward when horizontal, leftward when vertical; negative goes the other way), options?: {units: in|mm|pt|pc|px|cm|m|ft|yd, precision: 0-6, scale: drawing:real, hideUnits, lineWeight, lineType: solid|dashed|dotted, lineColor: [r,g,b], arrowStyle: filled|open|tick|none, arrowHead: null|a built-in stroke.set arrowhead name (Barbed, LineArrow…; drawn at both ends in place of arrowStyle's head; versions that have the stroke arrowhead but do not read arrowHead draw arrowStyle when they draw the dimension again; custom arrowheads are refused), arrowScale: %, extensionWeight, extensionType, extensionColor, extensionOffset, extensionLength, hideExtensions, fontFamily, fontStyle, fontSize, textColor, textPosition: away|between, textAlignment: left|center|right, textOffset}} → {id,label}; linked measurements follow source edits", has_doc, create ), diff --git a/crates/engine/tests/it/dimensions.rs b/crates/engine/tests/it/dimensions.rs index d2c6148f7d..759b36d245 100644 --- a/crates/engine/tests/it/dimensions.rs +++ b/crates/engine/tests/it/dimensions.rs @@ -120,8 +120,9 @@ fn each_arrow_style_draws_its_stroke_arrowhead_at_both_ends() { /// `arrowHead` draws any built-in stroke arrowhead at both ends of the dimension line, and the /// native file keeps it. The saved `arrowStyle` stays one of the four values versions without -/// `arrowHead` read, and a dimension saved without `arrowHead` draws its arrow style. A custom -/// arrowhead and an unknown name are refused. +/// `arrowHead` read, and a dimension saved without `arrowHead` draws its arrow style. Options +/// without a stroke head are saved without `arrowHead`. A custom arrowhead, an unknown name and an +/// overlong name are refused. #[test] fn every_stroke_arrowhead_draws_as_a_dimension_arrowhead() { use vectorcraft_doc::{Arrowhead, dimension::ArrowStyle}; @@ -166,8 +167,13 @@ fn every_stroke_arrowhead_draws_as_a_dimension_arrowhead() { older.add_document(vectorcraft_format::load(&serde_json::to_vec(&file).unwrap()).unwrap(), None); let o = recipe(&older, id).options; assert_eq!((o.arrow_style, o.arrow_head.clone(), o.arrowhead()), (ArrowStyle::Open, None, Some(Arrowhead::TriangleOpen))); + // Without a stroke head, the saved and recorded options carry no `arrowHead`, and a null one + // is still taken. + let saved = serde_json::to_value(&recipe(&s, id).options).unwrap(); + assert!(saved.get("arrowHead").is_none(), "{saved}"); + assert!(s.execute("dimension.create", &json!({"a":[0,0],"b":[72,0],"options":{"arrowHead":null}})).is_ok()); let custom = json!({"Custom":{"name":"Dot","path":{"subpaths":[]}}}); - for bad in [json!("Custom"), json!("Arrowhead"), json!("barbed"), json!(3), custom] { + for bad in [json!("Custom"), json!("Arrowhead"), json!("barbed"), json!(3), json!("Barbed".repeat(20)), custom] { let p = json!({"a":[0,0],"b":[72,0],"options":{"arrowHead":bad}}); assert!(s.execute("dimension.create", &p).is_err(), "{bad}"); } diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 9e9c4e6816..b109ca486b 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -610,6 +610,8 @@ pub fn accepts_field(d: &Dialog, field: &str) -> bool { /// one picked from its menu does, and the preset it shows follows the DXF options set this way. /// A Graph Data Column Width set this way sets every column, as Cell Style's does. An Import PDF /// `allPages` set this way to the other pick sets Import PDF pages as links back to its default. +/// A Dimension Tool Options `arrowStyle` set this way clears `arrowHead`, and a built-in +/// `arrowHead` set this way sets the `arrowStyle` of its Arrow Style entry, as that menu does. pub fn set_field(d: &mut Dialog, field: String, value: Value) { if d.kind == brush_options::KIND { brush_art_options::note_set(d, &field); @@ -623,6 +625,9 @@ pub fn set_field(d: &mut Dialog, field: String, value: Value) { if d.kind == import_pdf::KIND { import_pdf::note_set(d, &field, &value); } + if d.kind == dimension::KIND { + dimension::note_set(d, &field, &value); + } if d.kind == "preferences" { crate::prefs_dialog::note_set(d, &field, &value); } diff --git a/crates/ui-egui/src/dialogs/dimension.rs b/crates/ui-egui/src/dialogs/dimension.rs index b4f79f0836..00a06c90fd 100644 --- a/crates/ui-egui/src/dialogs/dimension.rs +++ b/crates/ui-egui/src/dialogs/dimension.rs @@ -15,6 +15,8 @@ pub(super) const SPEC: DialogSpec = DialogSpec { ok: Some("Save"), min_width: 520.0, max_width: Some(560.0), + // The saved options leave `arrowHead` out when it is null. + inputs: |_| &["arrowHead"], ..DialogSpec::FORM }; @@ -48,7 +50,8 @@ impl ArrowChoice { } } /// The Arrow Style entries: Filled, Open, Tick and None, then the other built-in stroke arrowheads -/// in the Stroke panel's order. A stroke arrowhead keeps `filled` as its `arrowStyle`. +/// in the Stroke panel's order. A stroke arrowhead keeps `filled` as its `arrowStyle`, the head that +/// versions which do not read `arrowHead` draw when they draw the dimension again. fn arrow_choices() -> Vec { let named = [(ArrowStyle::Filled, "Filled"), (ArrowStyle::Open, "Open"), (ArrowStyle::Tick, "Tick"), (ArrowStyle::None, "None")]; let heads = Arrowhead::ALL.into_iter().filter(|h| !named.iter().any(|(s, _)| s.arrowhead().as_ref() == Some(h))); @@ -73,6 +76,32 @@ pub fn open(app: &mut VectorcraftApp) -> Result { Ok(json!({"dialog":KIND})) } +/// For `ui.dialog.set`, as the Arrow Style menu sets them: an `arrowStyle` set alone draws that +/// style's own head, and a built-in head set as `arrowHead` takes the arrow style of its Arrow +/// Style entry (`tick` for `Slash`, `filled` for `Barbed`). +pub(super) fn note_set(d: &mut Dialog, field: &str, value: &Value) { + match field { + "arrowStyle" => { + d.fields.insert("arrowHead".into(), Value::Null); + } + "arrowHead" => { + let head = built_in_head(value); + if let Some(ch) = arrow_choices().into_iter().find(|ch| head.is_some() && ch.drawn() == head) + && let Ok(style) = serde_json::to_value(ch.style) + { + d.fields.insert("arrowStyle".into(), style); + } + } + _ => {} + } +} + +/// The built-in stroke arrowhead `value` names. Only a short name is read: a draft may hold anything. +fn built_in_head(value: &Value) -> Option { + let name = value.as_str().filter(|name| name.len() <= 64)?; + serde_json::from_value::(Value::String(name.into())).ok().filter(|h| !matches!(h, Arrowhead::Custom(_))) +} + fn read(fields: &serde_json::Map) -> Result { let o: DimensionOptions = serde_json::from_value(Value::Object(fields.clone())).map_err(|e| e.to_string())?; o.validate()?; @@ -105,10 +134,10 @@ fn arrow_style(ui: &mut Ui, fields: &mut serde_json::Map, id: &st widgets::label_row(ui, tl!("Arrow Style:"), 96.0, |ui| { let choices = arrow_choices(); let style = fields.get(STYLE).cloned().and_then(|v| serde_json::from_value::(v).ok()); - let head = fields.get(HEAD).cloned().and_then(|v| serde_json::from_value::>(v).ok()).flatten(); + let head = fields.get(HEAD).and_then(built_in_head); let current = style.map(|s| head.or_else(|| s.arrowhead())); let shown = current.and_then(|c| choices.iter().position(|ch| ch.drawn() == c)); - let names: Vec<&str> = choices.iter().map(|ch| tl!(ch.name)).collect(); + let names: Vec<&str> = choices.iter().map(|ch| crate::panels::stroke::builtin_arrow_name(ch.name)).collect(); let icon = |ui: &Ui, rect: egui::Rect, i: usize, ink: egui::Color32, _: bool| { // Only the rows in view render their previews. if ui.is_rect_visible(rect) @@ -413,9 +442,13 @@ mod tests { assert!(text.contains(label), "{label}: {text}"); } let d = app.ui.dialog.as_mut().unwrap(); + // The default style has no `arrowHead`, and the dialog still takes one. + assert!(!d.fields.contains_key("arrowHead") && super::super::accepts_field(d, "arrowHead")); d.fields.insert("scale".into(), json!("1:10")); d.fields.insert("units".into(), json!("pc")); + d.fields.insert("arrowHead".into(), json!("Barbed")); super::super::confirm(&mut app).unwrap(); + assert_eq!(app.session.tool_options_of("dimension")["style"]["arrowHead"], "Barbed"); assert_eq!(app.session.tool_options_of("dimension")["style"]["scale"], "1:10"); assert_eq!(app.session.tool_options_of("dimension")["style"]["units"], "pc"); open(&mut app).unwrap(); @@ -423,6 +456,28 @@ mod tests { assert!(super::super::confirm(&mut app).is_err()); app.ui.dialog = None; assert_eq!(app.session.tool_options_of("dimension")["style"]["scale"], "1:10"); + // An arrow style set by `ui.dialog.set` replaces the Barbed head, as the menu does. + open(&mut app).unwrap(); + super::super::set_field(app.ui.dialog.as_mut().unwrap(), "arrowStyle".into(), json!("none")); + super::super::confirm(&mut app).unwrap(); + let style = serde_json::from_value::(app.session.tool_options_of("dimension")["style"].clone()).unwrap(); + assert_eq!((style.arrow_style, style.arrowhead()), (ArrowStyle::None, None)); + // A stroke head set by `ui.dialog.set` keeps Filled as the arrow style, as the menu does; an + // unknown name leaves the arrow style as it was. + open(&mut app).unwrap(); + let d = app.ui.dialog.as_mut().unwrap(); + super::super::set_field(d, "arrowStyle".into(), json!("tick")); + super::super::set_field(d, "arrowHead".into(), json!("Nope")); + assert_eq!(d.fields["arrowStyle"], "tick"); + super::super::set_field(d, "arrowHead".into(), json!("Barbed")); + super::super::confirm(&mut app).unwrap(); + let style = serde_json::from_value::(app.session.tool_options_of("dimension")["style"].clone()).unwrap(); + assert_eq!((style.arrow_style, style.arrowhead()), (ArrowStyle::Filled, Some(Arrowhead::Barbed))); + // The head of an older style takes that style, as its menu entry does. + open(&mut app).unwrap(); + let d = app.ui.dialog.as_mut().unwrap(); + super::super::set_field(d, "arrowHead".into(), json!("Slash")); + assert_eq!(d.fields["arrowStyle"], "tick"); } /// A selected dimension shows its style in Properties, with Apply to All and Set as Default. diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index 9bc64ef92b..d3a96d84ab 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -5688,6 +5688,7 @@ lighting Light Светлина B5 B5 Bar Лента Barbed С кукички +arrowhead Feather Перо Baseline (Standard) Основна линия (стандартна) Baseline Optimized Оптимизирана основна линия Basic Основен diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 9f47390398..fbaa4c373e 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -5892,6 +5892,7 @@ imageTrace Outline Obris Arrow Strelica Arrow (open) Strelica (otvorena) Barbed Bodljikavo +arrowhead Feather Pero Half Arrow (left) Polustrelica (lijevo) Half Arrow (right) Polustrelica (desno) Concave Konkavno diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 3bc8a2c6ef..6e3a18afb1 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -456,6 +456,7 @@ antiAlias Sharp Nítid Bar Barra Bar Graph Tool Eina de gràfic de barres Barbed Amb pues +arrowhead Feather Ploma Bas Relief Baix relleu Bas Relief… Baix relleu… Base Along: Base al llarg de: diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index d43fe6bab8..a77d54e4e6 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -6273,6 +6273,7 @@ variable-list-end {0}, {1} {0} a {1} Arrow Šipka Arrow (open) Šipka (otevřená) Barbed S protihroty +arrowhead Feather Pírko Half Arrow (left) Poloviční šipka (vlevo) Half Arrow (right) Poloviční šipka (vpravo) Concave Vkleslá diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index e31a9f3762..d9196c7013 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -8347,6 +8347,7 @@ imageTrace Outline Kontur Arrow Pil Arrow (open) Pil (åben) Barbed Modhager +arrowhead Feather Fjer Half Arrow (left) Halvpil (venstre) Half Arrow (right) Halvpil (højre) Concave Konkav diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 1144e40b34..57cb36aa50 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -7371,6 +7371,7 @@ anchor Points: Punkte: Square (open) Quadrat (offen) Arrow (open) Pfeil (offen) Barbed Mit Widerhaken +arrowhead Feather Feder Half Arrow (left) Halber Pfeil (links) Half Arrow (right) Halber Pfeil (rechts) Double Bar Doppelbalken diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 680c4d4ac1..7dace6b35e 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -6057,6 +6057,7 @@ variable-list-end {0}, {1} {0} και {1} Auto Size Αυτόματο μέγεθος Bar Ράβδος Barbed Αγκιστρωτό +arrowhead Feather Φτερό Baseline (Standard) Γραμμή βάσης (τυπική) Baseline Optimized Βελτιστοποιημένο για γραμμή βάσης Black Outline Μαύρο περίγραμμα diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index f55b74ee31..33f95be895 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -6226,6 +6226,7 @@ effect Regular Regular Arrow Flecha Arrow (open) Flecha (abierta) Barbed Con púas +arrowhead Feather Emplumado Half Arrow (left) Media flecha (izquierda) Half Arrow (right) Media flecha (derecha) Concave Cóncava diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 0012b6f87b..f8060bf336 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -6185,6 +6185,7 @@ variable-list-end {0}, {1} {0} ja {1} Arrow Nuoli Arrow (open) Nuoli (avoin) Barbed Väkänen +arrowhead Feather Sulka Half Arrow (left) Puolinuoli (vasen) Half Arrow (right) Puolinuoli (oikea) Concave Kovera diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index fc37f336b5..2b7d5d50df 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -2036,7 +2036,6 @@ font-technology Variable Variables Limit to Library: Limiter à la bibliothèque : Limit: Limite : Line Ligne - Line Arrow Flèche filaire Line Art and Text Resolution: Résolution des dessins au trait et du texte : Line Breaks Sauts de ligne Line Color Couleur de ligne @@ -6261,6 +6260,7 @@ lighting Light Lumière B5 B5 Bar Barre Barbed Barbelée +arrowhead Feather Empennage Baseline (Standard) De base (standard) Baseline Optimized De base optimisé Basic De base @@ -6389,6 +6389,7 @@ lighting Light Lumière Letterhead A4 Papier à en-tête A4 Letterhead Letter Papier à en-tête Lettre US Line Art Dessin au trait + Line Arrow Flèche filaire Linear Linéaire Logo 1000×1000 Logo 1000×1000 Low Fidelity Photo Photo basse fidélité diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index dbbc5db7bc..357c376b56 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -3101,6 +3101,7 @@ Square (open) ચોરસ (ખુલ્લો) Arrow (open) તીર (ખુલ્લું) Barbed કાંટાળું +arrowhead Feather પીંછું Half Arrow (left) અડધું તીર (ડાબે) Half Arrow (right) અડધું તીર (જમણે) Double Bar બેવડી પટ્ટી diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index f0b4e57d16..00660141a0 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -807,6 +807,7 @@ antiAlias Sharp शार्प Bar बार Bar Graph Tool बार ग्राफ़ टूल Barbed कंटीले +arrowhead Feather पंख Bas Relief बास रिलीफ़ Bas Relief… बास रिलीफ़… Base Along: आधार के साथ: diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 248471e24a..732efa4a98 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -409,6 +409,7 @@ font-technology Variable Változó Bar Vonal Bar Graph Tool Sávdiagram Barbed Szakállas +arrowhead Feather Tollazat Baseline Alapvonal Baseline (Standard) Alapvonali (szabványos) Baseline Optimized Alapvonali, optimalizált diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index bc3a63101a..1c8ee40797 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -5541,6 +5541,7 @@ imageTrace Outline Kontur Arrow Panah Arrow (open) Panah (terbuka) Barbed Berduri +arrowhead Feather Bulu Half Arrow (left) Setengah panah (kiri) Half Arrow (right) Setengah panah (kanan) Concave Cekung diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 4bd0150964..108b682ab2 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -7408,6 +7408,7 @@ anchor Points: Punti: Square (open) Quadrato (aperto) Arrow (open) Freccia (aperta) Barbed Uncinata +arrowhead Feather Piuma Half Arrow (left) Mezza freccia (sinistra) Half Arrow (right) Mezza freccia (destra) Double Bar Doppia barra diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index f7ff828023..278dc41ecf 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -9298,6 +9298,7 @@ anchor Points: ポイント: Square (open) 正方形 (白抜き) Arrow (open) 矢印 (白抜き) Barbed かえし付き +arrowhead Feather 矢羽根 Half Arrow (left) 片矢印 (左) Half Arrow (right) 片矢印 (右) Double Bar 二重バー diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 2543c8b152..26c6774c75 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -7664,6 +7664,7 @@ font-technology Variable ცვლადი Arrow ისარი Arrow (open) ისარი (ღია) Barbed წვეტიანი +arrowhead Feather ბუმბული Half Arrow (left) ნახევარი ისარი (მარცხენა) Half Arrow (right) ნახევარი ისარი (მარჯვენა) Concave ჩაზნექილი diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 46515dc315..f622d20def 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -7380,6 +7380,7 @@ anchor Points: 포인트: Square (open) 사각 (윤곽) Arrow (open) 화살표 (윤곽) Barbed 미늘 +arrowhead Feather 깃털 Half Arrow (left) 반쪽 화살표 (왼쪽) Half Arrow (right) 반쪽 화살표 (오른쪽) Double Bar 이중 막대 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index c7af9b1404..d31e894f5f 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -8060,6 +8060,7 @@ imageTrace Outline Contour Arrow Pijl Arrow (open) Pijl (open) Barbed Weerhaak +arrowhead Feather Veer Half Arrow (left) Halve pijl (links) Half Arrow (right) Halve pijl (rechts) Concave Concaaf diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 427ff037a8..4f8d371227 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -6125,6 +6125,7 @@ variable-list-end {0}, {1} {0} i {1} Arrow Strzałka Arrow (open) Strzałka (otwarta) Barbed Zadziorowata +arrowhead Feather Pióro Half Arrow (left) Pół strzałki (lewa) Half Arrow (right) Pół strzałki (prawa) Concave Wklęsła diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index e5bbd3db53..940562d907 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -6208,6 +6208,7 @@ effect Regular Regular Arrow Seta Arrow (open) Seta (aberta) Barbed Farpada +arrowhead Feather Pena Half Arrow (left) Meia Seta (esquerda) Half Arrow (right) Meia Seta (direita) Concave Côncava diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 862a0c3616..db35beb9ad 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -7357,6 +7357,7 @@ axis Y Axis Ось Y Auto Size Авторазмер Bar Черта Barbed С зазубриной +arrowhead Feather Перо Baseline (Standard) Базовый (стандартный) Baseline Optimized Базовый оптимизированный Bicubic Бикубическая diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 047a1ebf93..ae199e1e80 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -6173,6 +6173,7 @@ lighting Light Ljus B5 B5 Bar Lodstreck Barbed Hullingförsedd +arrowhead Feather Fjäder Baseline (Standard) Baseline (standard) Baseline Optimized Baseline optimerad Basic Grundläggande diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index 3521580eac..bb31ef765d 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -674,14 +674,14 @@ fn built_in_library_style_names_are_in_complete_catalogs() { } /// The Stroke panel and the Dimension tool's Arrow Style list the built-in arrowheads by name, so -/// each name has a row in each complete catalog. Feather is not checked: a plain `Feather` row also -/// names the History steps of the Feather effect, which otherwise take the effect's menu row. +/// each name has a row in each complete catalog: an `arrowhead` row, or a plain one. Feather needs +/// its `arrowhead` row, since its plain row may name the Feather effect. #[test] fn built_in_arrowhead_names_are_in_complete_catalogs() { use vectorcraft_doc::Arrowhead; - let names = distinct(Arrowhead::ALL.iter().filter(|h| **h != Arrowhead::Feather).map(|h| h.label().to_string()).collect()); - assert_eq!(names.len(), 40, "{names:?}"); - let bad = lacking(&names, |c, n| c.plain(n).is_some()); + let names = distinct(Arrowhead::ALL.iter().map(|h| h.label().to_string()).collect()); + assert_eq!(names.len(), 41, "{names:?}"); + let bad = lacking(&names, |c, n| c.contextual("arrowhead", n).is_some() || (n != "Feather" && c.plain(n).is_some())); assert!(bad.is_empty(), "{}", bad.join("\n")); } diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 4505a40fb9..1c4a7dad54 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -6026,6 +6026,7 @@ lighting Light Işık B5 B5 Bar Bar Barbed Dikenli +arrowhead Feather Tüy Baseline (Standard) Temel (Standart) Baseline Optimized Temel Optimize Edilmiş Basic Temel diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 787fcd5ffb..916d1e2609 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -7390,6 +7390,7 @@ anchor Points: Точки: Square (open) Квадрат (контурний) Arrow (open) Стрілка (контурна) Barbed Зазубрена +arrowhead Feather Оперення Half Arrow (left) Половина стрілки (ліворуч) Half Arrow (right) Половина стрілки (праворуч) Double Bar Подвійна смуга diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index e4c0e838e5..0ce8b85e91 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -7434,6 +7434,7 @@ anchor Points: Điểm: Square (open) Hình vuông (rỗng) Arrow (open) Mũi tên (rỗng) Barbed Có ngạnh +arrowhead Feather Lông vũ Half Arrow (left) Nửa mũi tên (trái) Half Arrow (right) Nửa mũi tên (phải) Double Bar Thanh đôi diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index a3d805eefa..b4c292757d 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -7617,6 +7617,7 @@ anchor Points: 点: Square (open) 正方形 (空心) Arrow (open) 箭头 (空心) Barbed 倒钩 +arrowhead Feather 羽毛 Half Arrow (left) 半箭头 (左) Half Arrow (right) 半箭头 (右) Double Bar 双条形 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index bbc027d990..da9b5d13e8 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -7439,6 +7439,7 @@ anchor Points: 點: Square (open) 正方形 (空心) Arrow (open) 箭頭 (空心) Barbed 倒鉤 +arrowhead Feather 羽毛 Half Arrow (left) 半箭頭 (左) Half Arrow (right) 半箭頭 (右) Double Bar 雙長條 diff --git a/crates/ui-egui/src/panels/stroke.rs b/crates/ui-egui/src/panels/stroke.rs index 33faeec41e..8bdad7d576 100644 --- a/crates/ui-egui/src/panels/stroke.rs +++ b/crates/ui-egui/src/panels/stroke.rs @@ -109,10 +109,16 @@ fn arrow_label(a: Option<&Arrowhead>) -> &'static str { fn arrow_name(a: Option<&Arrowhead>) -> String { match a { Some(Arrowhead::Custom(c)) => c.name.clone(), - _ => tl!(arrow_label(a)).to_string(), + _ => builtin_arrow_name(arrow_label(a)).to_string(), } } +/// A built-in arrowhead's name `label` in the interface language. Its `arrowhead` row comes first, +/// so a name that is also an effect's (Feather) can be translated for each one. +pub(crate) fn builtin_arrow_name(label: &str) -> &str { + crate::i18n::tr_ctx(crate::i18n::current(), "arrowhead", label) +} + /// The preview cache key of `a`: its name, and for a custom head its art. fn arrow_key(a: Option<&Arrowhead>) -> String { match a { diff --git a/docs/dimensions.md b/docs/dimensions.md index f5404d5880..26acdee9fb 100644 --- a/docs/dimensions.md +++ b/docs/dimensions.md @@ -90,7 +90,9 @@ from the object) or **Between Line and Object**; **Alignment** is **Left**, **Ce **Arrow Style** lists **Filled**, **Open**, **Tick** and **None**, then every other built-in arrowhead of the Stroke panel, each with a drawn preview before its name. Custom arrowheads are not -listed. +listed. A version that has the arrowhead in the Stroke panel but not in Arrow Style keeps the saved +arrows of such a dimension until it draws the dimension again, and then draws **Filled** arrows. A +version without the arrowhead does not open the file. Scale means **drawing : real size**, independent of zoom. At **1:10** a 1 in line on the page is labelled 10 in; at **10:1**, 0.1 in. It scales lengths, not angles or the size of text and arrows. diff --git a/docs/mcp.md b/docs/mcp.md index fd8fb76a0a..a9e563d0f1 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -6134,7 +6134,9 @@ arrowheads in a separate arrowheads file. A dimension's options (`dimension.create`, `dimension.update` and the Dimension tool's `style`) take `arrowStyle` (`filled`, `open`, `tick` or `none`: `Triangle`, `TriangleOpen`, `Slash` or no head) and `arrowHead`, `null` or one of the built-in head names `stroke.set` takes, drawn at both ends in place of the arrow style's head. The Arrow Style menu -sets `arrowStyle` to `filled` when it sets `arrowHead`. A custom arrowhead and an unknown name are refused. +sets `arrowStyle` to `filled` when it sets `arrowHead`. A custom arrowhead and an unknown name are refused. Versions +that have the stroke arrowhead but do not read `arrowHead` keep the saved arrows until they draw the dimension again, +and then draw `arrowStyle`. Versions without the stroke arrowhead do not open the file. ## Stroke bounds and clicks diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 3fd725c54c..e3bb443dd8 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -655,7 +655,7 @@ since 2026-10-01. **Drawing tools, Dimension tool lines line up with dimensions already drawn (#8063, #5590):** By VectorCraft's own rule, with Smart Guides on, a linear dimension placed with its line within the Smart Guides snapping tolerance of the level of a parallel line of a visible, unlocked linear dimension already drawn has its line on that level, and with Alignment Guides on a guide runs along the level across both lines while it is placed. `a_dimension_line_placed_beside_another_lands_on_its_level`, `a_dimension_line_on_another_level_shows_one_guide_across_both`, `a_dimension_of_the_same_points_lines_up_and_the_line_follows_the_pointer`, `a_dimension_dragged_out_beside_another_lands_on_its_level` and `a_line_the_pointer_lies_across_wins_on_one_level` cover it. **Drawing tools, Dimension tool dimensions selected with their art keep their lines and label:** Object › Expand, Object › Expand Appearance and Object › Path › Outline Stroke leave a dimension selected with art it measures, directly or in selected groups without fills, strokes or effects of their own, as it is and change only the other art; when the new art no longer fits its link, the dimension stays where it was, no longer linked, and undo links it again. `expand_leaves_a_dimension_selected_with_its_art_as_it_is`, `expand_appearance_leaves_a_dimension_selected_with_its_art_as_it_is`, `outline_stroke_leaves_a_dimension_selected_with_its_art_as_it_is`, `a_dimension_selected_with_art_that_has_nothing_to_expand_changes_nothing`, `a_group_effect_expanded_reaches_the_dimension_it_holds`, `expand_keeps_a_dimension_in_its_asset_and_its_variable_binding`, `a_dimension_keeps_no_link_to_the_art_expand_replaced`, `a_dimension_outlasts_the_art_outline_stroke_or_expand_appearance_replaced`, `a_dimension_outlasts_the_stroke_expand_outlined` and `expand_appearance_in_safe_mode_leaves_a_dimension_selected_with_its_art` cover it. **Drawing tools, Dimension tool Arrow Style shows each arrowhead (#8049):** The Arrow Style dropdown in Dimension Tool Options and in the Properties panel's Dimension section draws each style's arrowhead at the end of a short line before its name, in the open list and in the closed field, using the Stroke panel's arrowhead previews. Filled, Open, Tick and None are the same four styles, saved as before. `arrow_style_shows_a_drawn_arrowhead` and `each_arrow_style_draws_its_stroke_arrowhead_at_both_ends` cover it. -**Drawing tools, Dimension tool Arrow Style offers every stroke arrowhead (#8049, #3222):** By VectorCraft's own rule, Arrow Style lists Filled, Open, Tick and None, then the other 38 built-in Stroke panel arrowheads, each with its drawn preview. The options save the head in `arrowHead` (`Barbed`) and keep `arrowStyle` at `filled`; documents and tool settings saved before open unchanged. `every_stroke_arrowhead_draws_as_a_dimension_arrowhead`, `arrow_style_shows_a_stroke_arrowhead`, `arrow_style_list_names_each_style_once` and `built_in_arrowhead_names_are_in_complete_catalogs` cover it. +**Drawing tools, Dimension tool Arrow Style offers every stroke arrowhead (#8049, #3222):** By VectorCraft's own rule, Arrow Style lists Filled, Open, Tick and None, then the other 38 built-in Stroke panel arrowheads, each with its drawn preview. The options save the head in `arrowHead` (`Barbed`) and keep `arrowStyle` at `filled`, so versions that have the stroke arrowhead but not `arrowHead` keep the saved arrows until they draw the dimension again and then draw Filled arrows (versions without the stroke arrowhead do not open the file); documents and tool settings saved before open unchanged. `every_stroke_arrowhead_draws_as_a_dimension_arrowhead`, `arrow_style_shows_a_stroke_arrowhead`, `arrow_style_list_names_each_style_once` and `built_in_arrowhead_names_are_in_complete_catalogs` cover it. **Drawing tools, Line Segment from one curve onto a common tangent of another:** By VectorCraft's own rule, with Smart Guides and Snap to Tangent on, a Line Segment drag pressed anywhere on a convex closed path with curves and dragged to within the snapping tolerance of another such path lands on a common tangent of the two ([tangent lines to circles](https://en.wikipedia.org/wiki/Tangent_lines_to_circles)): both ends move to where the line touches the paths, the start sliding along the first path, and each end shows the "tangent" label when Anchor/Path Labels is on, with the line drawn as a guide when Alignment Guides is on. The line is the tangent whose touch point on the second path is nearest the pointer, so moving the pointer around the second path switches between the outer tangent and the one crossing between the paths. The start stays where it was pressed when Shift, Alt or Space is held, when an anchor, center or crossing lies nearer the pointer than the second path does, when the press snapped to an anchor, center or crossing off the first path, when Snap to Tangent is off, when Snap to Grid or pixel snapping places drawn points, or when either path bends inward somewhere or has more than 512 segments. `a_line_from_one_circle_to_another_lands_on_their_common_tangent`, `a_line_from_a_turned_ellipse_lands_on_its_tangent_with_a_circle`, `a_line_near_the_second_path_takes_the_tangent_touching_it_nearest`, `a_line_keeps_its_start_without_a_tangent_snap`, `a_line_to_a_crescent_or_from_an_anchor_beside_the_curve_keeps_its_start` and `a_line_segment_drag_draws_the_common_tangent_as_one_undo_step` cover it. **Live trace result bounds and selection highlights exclude the retained bitmap except in source-image views:** `live_trace_result_bounds_exclude_the_retained_bitmap_at_any_angle` checks every TraceView, geometric and visual bounds and rotated result bounds. `live_trace_selection_highlight_excludes_the_retained_source_rectangle` checks result highlights and the existing ordinary-group policy. Shared editing-child traversal also preserves Shaper handling. **Artboard Options shares existing presets and orientation controls and can fit artwork without moving it; artwork fitting includes all drawn document art across artboards and off-board; artwork bounds are cached by active document and revision, and selection uses the shared bounds cache across artboards:** Shared existing preset definitions are reused; no external preset assets are added. Presets preserve each selected artboard's orientation, and orientation choices apply even when the active board already matches. Fit operations draft bounds until OK, affect only the active artboard and leave artwork in place. Regression coverage checks draft/Cancel, selected-set application, active-only fitting and Undo.