[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
+2
-12
@@ -1,6 +1,6 @@
|
||||
// Bild-Datei → eingebettete Data-URL + natürliche Pixelgrösse — gemeinsame
|
||||
// Grundlage für „Bild einfügen" im Plan (Drawing2D `{shape:"image"}`) UND im
|
||||
// Layout (LayoutAnnotation `kind:"image"`). Reine Browser-API (FileReader +
|
||||
// Grundlage für „Bild einfügen" (Drawing2D `{shape:"image"}`, auch auf einem
|
||||
// Layout-Blatt). Reine Browser-API (FileReader +
|
||||
// Image), kein Tauri-fs nötig — funktioniert identisch im Web-Preview.
|
||||
|
||||
export interface LoadedImageAsset {
|
||||
@@ -36,13 +36,3 @@ export function defaultImageSizeM(
|
||||
const ratio = naturalHeight / Math.max(1, naturalWidth);
|
||||
return { widthM, heightM: Math.max(0.05, widthM * ratio) };
|
||||
}
|
||||
|
||||
/** Default-Grösse (mm) fürs Layout-Blatt, analog mit anderer Default-Breite. */
|
||||
export function defaultImageSizeMm(
|
||||
naturalWidth: number,
|
||||
naturalHeight: number,
|
||||
widthMm = 60,
|
||||
): { widthMm: number; heightMm: number } {
|
||||
const ratio = naturalHeight / Math.max(1, naturalWidth);
|
||||
return { widthMm, heightMm: Math.max(2, widthMm * ratio) };
|
||||
}
|
||||
Reference in new issue
Block a user