Attribute: Fuellart Keine/Vollflaeche/Schraffur fuer geschlossene 2D-Elemente
This commit is contained in:
1 parent
4b2e02b37a
commit
6fbc8d4ff8
7 files changed
+111
No files matched your search
@@ -7,6 +7,7 @@
|
||||
//
|
||||
// Extrahiert aus App.tsx. Bezeichner englisch, Kommentare deutsch (CONVENTIONS.md).
|
||||
|
||||
import { applyFillMode } from "./fillMode";
|
||||
import { useMemo, type RefObject } from "react";
|
||||
import type { DrawingLevel, Layout, Project } from "../model/types";
|
||||
import { resolvePenColor } from "../model/penSets";
|
||||
@@ -470,6 +471,13 @@ export function usePanelHostBase(opts: {
|
||||
if (selection?.kind === "drawing2d")
|
||||
setElementFillColor(selection.id, color);
|
||||
},
|
||||
onSetSelectionFillMode: (mode) => {
|
||||
if (selection?.kind !== "drawing2d") return;
|
||||
setProject((p) => ({
|
||||
...p,
|
||||
drawings2d: p.drawings2d.map((d) => (d.id === selection.id ? applyFillMode(d, p.hatches, mode) : d)),
|
||||
}));
|
||||
},
|
||||
onSetSelectionFillOpacity: (opacity) => {
|
||||
if (selection?.kind === "drawing2d")
|
||||
setProject((p) => ({
|
||||
|
||||
Reference in new issue
Block a user