[81] Aussenbemassung im Massstab der Ansicht statt fest 1:100

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTYBZBvLYCtugMJoKXaB67
This commit is contained in:
Claude committed 2026-11-04 15:02:43 +00:00
1 parent 4c61000fea
commit 4bd49d3b0c
6 files changed
+36 -7

No files matched your search

+2 -2
View File
@@ -23,8 +23,8 @@ export const autodimCommand: Command = {
autoRun: (ctx: CommandContext): CommandResult => {
if (ctx.level.kind !== "floor") return { draft: null, done: true };
// Ketten im Kern (`cmd_draw.rs`, `auto_dimensions.rs`); ohne Ketten (keine Wände) kein Commit.
if (!createPreview(ctx, { cmd: "autodim" }, []).ok) return { draft: null, done: true };
return { draft: null, done: true, commit: createMutation(ctx, { cmd: "autodim" }) };
if (!createPreview(ctx, { cmd: "autodim", scale: ctx.scaleDenominator ?? 100 }, []).ok) return { draft: null, done: true };
return { draft: null, done: true, commit: createMutation(ctx, { cmd: "autodim", scale: ctx.scaleDenominator ?? 100 }) };
},
onInput: (): [CommandState, CommandResult] => done(),
+2
View File
@@ -93,6 +93,8 @@ export interface CommandContext {
level: DrawingLevel;
/** Default-Kategorie-Code für neue Elemente. */
defaultCategoryCode: string;
/** Papier-Massstab der aktuellen Ansicht (1:N); fehlt → 1:100. Ketten-/Symbolabstände in Papier-mm. */
scaleDenominator?: number;
/** Aktiver Linienstil-Code für 2D-Primitive. */
activeLineStyleId: string;
/**
+2
View File
@@ -21,6 +21,7 @@ import { loadAliasOverrides, saveAliasOverrides } from "./commandAliasOverrides"
import { loadShortcutOverrides, saveShortcutOverrides, type ShortcutOverrides } from "./keyboardShortcuts";
import { useCommandKeys } from "./commandKeys";
import { t } from "../i18n";
import { getState } from "./appStore";
import type { useSelectionState } from "./useSelectionState";
import type { useContextMenuState } from "../menus/useContextMenuState";
@@ -184,6 +185,7 @@ export function useCommandEngineHost(opts: {
project: c.project,
level: c.activeLevel,
defaultCategoryCode: c.activeCategoryCode,
scaleDenominator: getState().scaleDenominator,
activeLineStyleId: c.activeLineStyleId,
activeWallTypeId: c.activeWallTypeId,
lastPoint,