[121] Neurendern: Panels lesen Projekt und Objekt-Info selbst aus dem Store (useSelectionInfo, inhaltlich stabil), Panel-Host ohne project/selection/contextObjects und mit stabiler Identität (Handler als Trampoline), usePanelHostBase in src/state/panelHost/ zerlegt; Docks, versteckte Datei-Felder, Zeichnungs-Reiter und Präsentations-Dialog memoisiert; Wand-Änderung 55 → 42 Renders, Schranken im e2e gesenkt; Doku und TODO nachgeführt
This commit is contained in:
48 files changed
+1981
-1711
No files matched your search
@@ -6,7 +6,7 @@
|
||||
import { useCallback, useEffect, useMemo } from "react";
|
||||
import type { DrawingLevel, Project, ViewType } from "../model/types";
|
||||
import { sectionPlaneFromLevel } from "../core";
|
||||
import { deriveSelection } from "./selectionInfo";
|
||||
import { selectionInfoFor } from "./useSelectionInfo";
|
||||
import type { SelectionInfo } from "./selectionInfo";
|
||||
import type { useSelectionState } from "./useSelectionState";
|
||||
|
||||
@@ -24,9 +24,10 @@ export function useSectionLineState(opts: {
|
||||
const { project, selection, activeLevel, viewType, selectedSectionLineId, section3dCutId, setSection3dCutId } = opts;
|
||||
|
||||
// ── Selektions-Attribut-Kontrakt (Attributes-/Object-Info-Paletten) ───────
|
||||
// Normalisierte, effektiv aufgelöste Sicht auf das erste selektierte Element.
|
||||
// Normalisierte, effektiv aufgelöste Sicht auf das erste selektierte Element (gemeinsamer Cache mit
|
||||
// `useSelectionInfo` der Panels, inhaltlich stabil).
|
||||
const selectionInfo = useMemo(
|
||||
(): SelectionInfo | null => deriveSelection(project, selection),
|
||||
(): SelectionInfo | null => selectionInfoFor(project, selection),
|
||||
[project, selection],
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user