2D: Inline-Text-Editor-Nachbesserung (unsichtbarer Anker) + Textspalte als echtes Rechteck
Nutzer-Report nach der Umstellung auf Inline-Editing: beides funktionierte nicht — "Text" liess sich kein Ankerpunkt setzen, "Textspalte" sollte ein Rechteck statt nur eine Breite sein. Root Cause für "Text": `.planview-inline-text` bekam ohne Spaltenbreite `width: undefined` — bei position:fixed ohne rechten Rand greift shrink-to- fit-Sizing, das für ein LEERES contentEditable auf ~0px kollabiert. Der Klick erzeugte tatsächlich ein Element + öffnete den Editor, beides war nur unsichtbar (eine 0px-Box lässt sich nicht anklicken/fokussieren). Fix: neue Klasse .planview-inline-text-free (kein wrapWidth) erzwingt `width: max-content` + `white-space: pre` auf Editor/Surface (Box wächst mit dem Inhalt statt umzubrechen — "Text" bleibt einzeilig bis Enter, wie gewünscht) plus eine CSS-Mindestbreite (160px) für den leeren Startzustand. "Textspalte" (textbox.ts) zeichnet jetzt ein RECHTECK (zwei diagonale Ecken, beliebige Zugrichtung) statt nur eine horizontale Breitenlinie — die aufgezogene Höhe wird nicht im Modell gespeichert (das Textformat kennt nur `width` für den Wortumbruch, keine feste Rahmenhöhe), sondern als Editor-MINDESThöhe durchgereicht: CommandResult/EngineHost.focusDrawing um `focusMinHeightM` erweitert (Passthrough wie focusDrawingId), App.tsx hält sie in einem neuen editTextMinHeightM-State (useContextMenuState.ts), PlanView nutzt sie als CSS-min-height des Editors — der Rahmen wächst bei mehr Text darüber hinaus, schrumpft aber nicht darunter (InDesign-Verhalten). Beim Doppelklick-Editieren bestehender Elemente wird die Mindesthöhe zurückgesetzt (kein Nachwirken einer vorigen Textspalten-Erstellung). textbox.test.ts an die neue Rechteck-Geste angepasst (+ Test für beliebige Zugrichtung). tsc -b / vitest run (919/919) / npm run build grün. Die eigentliche Sichtbarkeits-Vermutung (CSS-Kollaps) konnte ich nicht interaktiv im Browser verifizieren (kein Browser-Tool verfügbar) — Nutzer prüft erneut in der laufenden App.
This commit is contained in:
@@ -93,6 +93,7 @@ export function Content({
|
||||
onStampEdit,
|
||||
onEditDrawingText,
|
||||
editTextId,
|
||||
editTextMinHeightM,
|
||||
onCommitTextEdit,
|
||||
onCloseTextEdit,
|
||||
onPlanSelect,
|
||||
@@ -182,6 +183,7 @@ export function Content({
|
||||
onStampEdit: (roomId: string) => void;
|
||||
onEditDrawingText?: (drawingId: string) => void;
|
||||
editTextId?: string | null;
|
||||
editTextMinHeightM?: number | null;
|
||||
onCommitTextEdit?: (doc: RichTextDoc) => void;
|
||||
onCloseTextEdit?: () => void;
|
||||
onPlanSelect: (sel: PlanSelection) => void;
|
||||
@@ -307,6 +309,7 @@ export function Content({
|
||||
onStampEdit={onStampEdit}
|
||||
onEditDrawingText={onEditDrawingText}
|
||||
editTextId={editTextId}
|
||||
editTextMinHeightM={editTextMinHeightM}
|
||||
onCommitTextEdit={onCommitTextEdit}
|
||||
onCloseTextEdit={onCloseTextEdit}
|
||||
onOpenSectionLevel={onSelectLevel}
|
||||
@@ -369,6 +372,7 @@ export function Content({
|
||||
onStampEdit={onStampEdit}
|
||||
onEditDrawingText={onEditDrawingText}
|
||||
editTextId={editTextId}
|
||||
editTextMinHeightM={editTextMinHeightM}
|
||||
onCommitTextEdit={onCommitTextEdit}
|
||||
onCloseTextEdit={onCloseTextEdit}
|
||||
onOpenSectionLevel={onSelectLevel}
|
||||
@@ -473,6 +477,7 @@ export function Content({
|
||||
onStampEdit={onStampEdit}
|
||||
onEditDrawingText={onEditDrawingText}
|
||||
editTextId={editTextId}
|
||||
editTextMinHeightM={editTextMinHeightM}
|
||||
onCommitTextEdit={onCommitTextEdit}
|
||||
onCloseTextEdit={onCloseTextEdit}
|
||||
onOpenSectionLevel={onSelectLevel}
|
||||
@@ -525,6 +530,7 @@ function LevelPlanView({
|
||||
onStampEdit,
|
||||
onEditDrawingText,
|
||||
editTextId,
|
||||
editTextMinHeightM,
|
||||
onCommitTextEdit,
|
||||
onCloseTextEdit,
|
||||
onOpenSectionLevel,
|
||||
@@ -570,6 +576,7 @@ function LevelPlanView({
|
||||
onStampEdit: (roomId: string) => void;
|
||||
onEditDrawingText?: (drawingId: string) => void;
|
||||
editTextId?: string | null;
|
||||
editTextMinHeightM?: number | null;
|
||||
onCommitTextEdit?: (doc: RichTextDoc) => void;
|
||||
onCloseTextEdit?: () => void;
|
||||
onOpenSectionLevel?: (id: string) => void;
|
||||
@@ -654,6 +661,7 @@ function LevelPlanView({
|
||||
onStampEdit={onStampEdit}
|
||||
onEditDrawingText={onEditDrawingText}
|
||||
editTextId={editTextId}
|
||||
editTextMinHeightM={editTextMinHeightM}
|
||||
onCommitTextEdit={onCommitTextEdit}
|
||||
onCloseTextEdit={onCloseTextEdit}
|
||||
onOpenSectionLevel={onOpenSectionLevel}
|
||||
@@ -713,6 +721,7 @@ function SectionPlanView({
|
||||
onStampEdit,
|
||||
onEditDrawingText,
|
||||
editTextId,
|
||||
editTextMinHeightM,
|
||||
onCommitTextEdit,
|
||||
onCloseTextEdit,
|
||||
onOpenSectionLevel,
|
||||
@@ -753,6 +762,7 @@ function SectionPlanView({
|
||||
onStampEdit: (roomId: string) => void;
|
||||
onEditDrawingText?: (drawingId: string) => void;
|
||||
editTextId?: string | null;
|
||||
editTextMinHeightM?: number | null;
|
||||
onCommitTextEdit?: (doc: RichTextDoc) => void;
|
||||
onCloseTextEdit?: () => void;
|
||||
onOpenSectionLevel?: (id: string) => void;
|
||||
@@ -863,6 +873,7 @@ function SectionPlanView({
|
||||
onStampEdit={onStampEdit}
|
||||
onEditDrawingText={onEditDrawingText}
|
||||
editTextId={editTextId}
|
||||
editTextMinHeightM={editTextMinHeightM}
|
||||
onCommitTextEdit={onCommitTextEdit}
|
||||
onCloseTextEdit={onCloseTextEdit}
|
||||
onOpenSectionLevel={onOpenSectionLevel}
|
||||
|
||||
Reference in New Issue
Block a user