[182] Reiter-Arten wie Archicad: Geschoss behält 3D, Schnitt/Ansicht/Zeichnung/Layout eigene Reiter, 3D aus jedem Reiter erreichbar

Reine Regeln navigateToLevel/switchViewKind in state/viewTabs.ts (vitest), Anwendung in
state/tabNavigation.ts; Navigator, Grundriss-/3D-Knöpfe, Menü, Layouts und Ausschnitt-Klick
wählen den passenden Reiter. 3D-Reiter heissen "3D · Geschoss". Neues e2e viewKinds.spec.ts;
viewTabs/sectionViews/views.spec an das neue Verhalten angepasst.
This commit is contained in:
Claude committed 2026-11-11 01:42:33 +00:00
1 parent 6c5d0f6f9d
commit 1419679963
21 files changed
+416 -40

No files matched your search

+7 -2
View File
@@ -22,7 +22,7 @@ export interface ViewSnapshotTabsHandlers {
onNew: () => void;
onClose: (tabId: string) => void;
/** Titel eines Reiters ohne Ausschnitt (Zeichnungskombination bzw. Zeichnungsebene). */
autoName: (levelId?: string) => string;
autoName: (levelId?: string, is3d?: boolean) => string;
}
const NO_SNAPSHOTS: ViewSnapshot[] = [];
@@ -31,8 +31,13 @@ const NO_SNAPSHOTS: ViewSnapshot[] = [];
export const DrawingTabs = memo(function DrawingTabs({ handlers }: { handlers: ViewSnapshotTabsHandlers }) {
const snapshots = useStore((s) => s.project.viewSnapshots) ?? NO_SNAPSHOTS;
const { tabs, onActivate, onNew, onClose, autoName } = handlers;
const liveLevelId = useStore((s) => s.activeLevelId);
const liveIs3d = useStore((s) => s.viewType === "perspektive");
// 3D-Reiter heissen „3D · Geschoss" (der aktive liest die Live-Ansicht).
const title = (tab: ViewTab) =>
tabTitle(tab, snapshots, (tb) => autoName(tb.id === tabs.activeId ? undefined : tb.state?.activeLevelId));
tabTitle(tab, snapshots, (tb) =>
tb.id === tabs.activeId ? autoName(liveIs3d ? liveLevelId : undefined, liveIs3d) : autoName(tb.state?.activeLevelId, tb.state?.viewType === "perspektive"),
);
const closable = tabs.tabs.length > 1;
return (