[182] [149] Grundriss-Knopf nur im Grundriss-Reiter hervorgehoben, toter Auto-Schnitt im 3D entfernt; TODO [149] auf Stand (Auswahlrechteck/Beschriftung waren schon gebaut)
This commit is contained in:
7 files changed
+25
-16
No files matched your search
+4
-1
@@ -1024,6 +1024,8 @@ function AboutDialog({ onClose }: { onClose: () => void }) {
|
||||
*/
|
||||
export interface ViewRibbonTabProps {
|
||||
viewToggleEnabled: boolean;
|
||||
/** Aktiver Reiter ist ein Grundriss-Reiter ([182]); sonst ist der Grundriss-Knopf nicht hervorgehoben. */
|
||||
planTabActive?: boolean;
|
||||
viewType: ViewType;
|
||||
onViewType: (v: ViewType) => void;
|
||||
view3d: View3d;
|
||||
@@ -1106,6 +1108,7 @@ const LiveScaleStat = memo(function LiveScaleStat({
|
||||
*/
|
||||
export const ViewRibbonTab = memo(function ViewRibbonTab({
|
||||
viewToggleEnabled,
|
||||
planTabActive = true,
|
||||
viewType,
|
||||
onViewType,
|
||||
view3d,
|
||||
@@ -1170,7 +1173,7 @@ export const ViewRibbonTab = memo(function ViewRibbonTab({
|
||||
<button
|
||||
type="button"
|
||||
className={`tb-vt-btn${
|
||||
viewToggleEnabled && viewType === "grundriss" ? " active" : ""
|
||||
viewToggleEnabled && planTabActive && viewType === "grundriss" ? " active" : ""
|
||||
}`}
|
||||
onClick={() => onViewType("grundriss")}
|
||||
disabled={!viewToggleEnabled}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// samt Ebenen-/Zeichnungs-Kombinationen — als memoisierte Elemente mit denselben Abhängigkeiten wie
|
||||
// zuvor ([121]), damit ein App-Render sie nicht neu zeichnet. Aufgerufen von `App.tsx` für die `TopBar`.
|
||||
|
||||
import { isPlanKindActive } from "../state/viewTabs";
|
||||
import { useMemo } from "react";
|
||||
import type { DrawingLevel, ModelViewOption, ViewType } from "../model/types";
|
||||
import { currentModelViewId, modelViewChoices } from "../state/modelViews";
|
||||
@@ -181,6 +182,7 @@ export function useTopBarElements(opts: {
|
||||
() => (
|
||||
<ViewRibbonTab
|
||||
viewToggleEnabled={true} /* [182] 3D/Grundriss sind aus jedem Reiter erreichbar */
|
||||
planTabActive={isPlanKindActive(viewType, activeLevel.kind)}
|
||||
viewType={viewType}
|
||||
onViewType={setViewType}
|
||||
view3d={view3d}
|
||||
|
||||
Reference in new issue
Block a user