[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:
6 files changed
+36
-7
No files matched your search
@@ -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(),
|
||||
|
||||
@@ -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;
|
||||
/**
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user