[89] Layout-Blatt: Zeichnen wie im Grundriss (Blatt-Ebene statt eigener Annotationen)
Jedes Layout hat eine Blatt-Ebene (DrawingLevel.layoutId, Papier 1:1 in Metern); ein offenes Blatt macht sie zur aktiven Ebene in derselben PlanView: gleiche Befehle, Fang, Griffe, Vorschau/HUD, Auswahl, Undo und dasselbe Rendering. Das Blatt liefert nur den Hintergrund (PlanView.backdrop) und das Platzieren der Viewports. Format 3 migriert Layout.annotations zu drawings2d. Layout-PDF legt die Blatt-Ebene über planToPrintSvg aufs Papier. Alter Annotations-Pfad gelöscht. e2e layoutSheet.spec.ts.
This commit is contained in:
43 files changed
+1245
-2756
No files matched your search
@@ -439,88 +439,6 @@ pub enum Drawing2DGeom {
|
||||
},
|
||||
}
|
||||
|
||||
/// Layout-Beschriftung (Tag `kind`).
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]
|
||||
#[serde(tag = "kind")]
|
||||
pub enum LayoutAnnotation {
|
||||
#[serde(rename = "line")]
|
||||
Line {
|
||||
id: String,
|
||||
#[serde(rename = "x1Mm")]
|
||||
x1_mm: f64,
|
||||
#[serde(rename = "y1Mm")]
|
||||
y1_mm: f64,
|
||||
#[serde(rename = "x2Mm")]
|
||||
x2_mm: f64,
|
||||
#[serde(rename = "y2Mm")]
|
||||
y2_mm: f64,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
color: Option<String>,
|
||||
#[serde(rename = "weightMm", default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
weight_mm: Option<f64>,
|
||||
},
|
||||
#[serde(rename = "rect")]
|
||||
Rect {
|
||||
id: String,
|
||||
#[serde(rename = "xMm")]
|
||||
x_mm: f64,
|
||||
#[serde(rename = "yMm")]
|
||||
y_mm: f64,
|
||||
#[serde(rename = "widthMm")]
|
||||
width_mm: f64,
|
||||
#[serde(rename = "heightMm")]
|
||||
height_mm: f64,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
color: Option<String>,
|
||||
#[serde(rename = "weightMm", default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
weight_mm: Option<f64>,
|
||||
},
|
||||
#[serde(rename = "text")]
|
||||
Text {
|
||||
id: String,
|
||||
#[serde(rename = "xMm")]
|
||||
x_mm: f64,
|
||||
#[serde(rename = "yMm")]
|
||||
y_mm: f64,
|
||||
text: String,
|
||||
#[serde(rename = "heightMm")]
|
||||
height_mm: f64,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
color: Option<String>,
|
||||
/// Reiches Textfeld (mehrere Absätze, gemischte Formatierung) — Vorrang vor
|
||||
/// `text`, s. gleichnamiges Feld bei `Drawing2DGeom["text"]`.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
doc: Option<RichTextDoc>,
|
||||
/// Optionale Rahmenbreite (mm) — bricht `doc` wortweise um; fehlt sie: einzeilig.
|
||||
#[serde(rename = "widthMm", default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
width_mm: Option<f64>,
|
||||
},
|
||||
#[serde(rename = "image")]
|
||||
Image {
|
||||
id: String,
|
||||
#[serde(rename = "xMm")]
|
||||
x_mm: f64,
|
||||
#[serde(rename = "yMm")]
|
||||
y_mm: f64,
|
||||
#[serde(rename = "widthMm")]
|
||||
width_mm: f64,
|
||||
#[serde(rename = "heightMm")]
|
||||
height_mm: f64,
|
||||
/// Bildquelle als Data-URL (PNG/JPEG) — eingebettet, keine externe Datei.
|
||||
src: String,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
opacity: Option<f64>,
|
||||
},
|
||||
}
|
||||
|
||||
/// Parametrische Wandregel (Tag `type`).
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]
|
||||
#[serde(tag = "type")]
|
||||
|
||||
Reference in new issue
Block a user