Attribut-Panel: Vordergrund/Hintergrund mit 'Nach System'
Die Attribut-Sektion 'Fuellung' zeigt statt der einen Fuellfarbe jetzt zwei Felder: Vordergrund (Muster-/Schraffurfarbe) und Hintergrund (Fuellung), jeweils per Element ueberschreibbar. Leerer Override = 'Nach System' (erbt); Farbe waehlen setzt den Override, x loescht ihn wieder. Schreibt Wall/Ceiling/Drawing2D.foreground/background ueber neue Store-Mutationen (setElementForeground/Background), gespiegelt zum bestehenden Fuellfarbe-Pfad. Die Resolve-Schicht (generatePlan) liest diese Overrides bereits, wirkt also sofort im Plan.
This commit is contained in:
+20
@@ -1720,6 +1720,8 @@ export default function App() {
|
||||
const setElementWeight = useStore((s) => s.setElementWeight);
|
||||
const setElementFill = useStore((s) => s.setElementFill);
|
||||
const setElementFillColor = useStore((s) => s.setElementFillColor);
|
||||
const setElementForeground = useStore((s) => s.setElementForeground);
|
||||
const setElementBackground = useStore((s) => s.setElementBackground);
|
||||
const resizeElement = useStore((s) => s.resizeElement);
|
||||
const updateWall = useStore((s) => s.updateWall);
|
||||
const setWallThickness = useStore((s) => s.setWallThickness);
|
||||
@@ -2026,6 +2028,24 @@ export default function App() {
|
||||
if (selection?.kind === "drawing2d")
|
||||
setElementFillColor(selection.id, color);
|
||||
},
|
||||
onSetSelectionForeground: (color) => {
|
||||
// Vordergrund-Override: Wand, Decke oder Drawing2D.
|
||||
if (
|
||||
selection?.kind === "wall" ||
|
||||
selection?.kind === "ceiling" ||
|
||||
selection?.kind === "drawing2d"
|
||||
)
|
||||
setElementForeground(selection.kind, selection.id, color);
|
||||
},
|
||||
onSetSelectionBackground: (color) => {
|
||||
// Hintergrund-Override: Wand, Decke oder Drawing2D.
|
||||
if (
|
||||
selection?.kind === "wall" ||
|
||||
selection?.kind === "ceiling" ||
|
||||
selection?.kind === "drawing2d"
|
||||
)
|
||||
setElementBackground(selection.kind, selection.id, color);
|
||||
},
|
||||
onResizeSelection: (w, h, anchor) => {
|
||||
if (selection?.kind === "wall" || selection?.kind === "drawing2d")
|
||||
resizeElement(selection.kind, selection.id, w, h, anchor);
|
||||
|
||||
Reference in New Issue
Block a user