[109] [101] Schraffuren: Generator als eigenes Crate (hatchgen), render3d-Live-Schnitt/Druck-SVG/SVG-PlanView zeichnen Schichtmuster mit dem Kern-Generator, Putz/Keramik/Faserzement mit Schraffur (Punktfeld), Standards aktualisieren im Ressourcen-Manager
This commit is contained in:
38 files changed
+1004
-74
No files matched your search
@@ -57,7 +57,7 @@ import {
|
||||
PEN_FALLBACK_COLOR,
|
||||
PEN_FALLBACK_WEIGHT,
|
||||
} from "../model/penSets";
|
||||
import { standardsMergeCounts, standardsMergeOps } from "../model/standards";
|
||||
import { standardsMergeCounts, standardsMergeOps, standardsUpdateOps } from "../model/standards";
|
||||
import { reorderByIds } from "../model/reorder";
|
||||
import { transformMutation } from "../tools/transform";
|
||||
import type { CopyMode, TransformOp, TransformSelection } from "../tools/transform";
|
||||
@@ -185,6 +185,8 @@ export interface ProjectSlice {
|
||||
seedStandardPenSet: () => void;
|
||||
/** Ergänzt die fehlenden SIA-400-Standards (Baustoffe, Schraffuren, Linientypen, Aufbauten; [100]–[102]). */
|
||||
loadStandards: () => void;
|
||||
/** „Standards aktualisieren" ([109]): ergänzt Fehlendes und bringt die gewählten Standard-Einträge (`"<Liste>:<id>"`) auf den heutigen Stand; ein Undo-Schritt. */
|
||||
updateStandards: (selected: string[]) => void;
|
||||
|
||||
// ── Benutzerdefinierte Farbpaletten (s. model/types.ts::CustomPalette) ────
|
||||
addCustomPalette: () => void;
|
||||
@@ -1035,6 +1037,12 @@ export function createProjectSlice(
|
||||
get().notify(parts.length ? t("resources.loadStandards.added", { list: parts.join(", ") }) : t("resources.loadStandards.none"), "info");
|
||||
},
|
||||
|
||||
updateStandards: (selected) => {
|
||||
const ops = standardsUpdateOps(get().project, selected);
|
||||
if (ops.length) applyChange(ops);
|
||||
get().notify(t("resources.updateStandards.done", { n: selected.length }), "info");
|
||||
},
|
||||
|
||||
addCustomPalette: () =>
|
||||
applyChange(
|
||||
addItems("customPalettes", [{ id: `palette-${Date.now()}`, name: t("default.customPaletteName"), colors: [] }]),
|
||||
|
||||
@@ -114,6 +114,7 @@ export function useProjectActions(
|
||||
const patchPenSetWeight = useStore((s) => s.patchPenSetWeight);
|
||||
const seedStandardPenSet = useStore((s) => s.seedStandardPenSet);
|
||||
const loadStandards = useStore((s) => s.loadStandards);
|
||||
const updateStandards = useStore((s) => s.updateStandards);
|
||||
const addCustomPalette = useStore((s) => s.addCustomPalette);
|
||||
const renameCustomPalette = useStore((s) => s.renameCustomPalette);
|
||||
const deleteCustomPalette = useStore((s) => s.deleteCustomPalette);
|
||||
@@ -425,6 +426,7 @@ export function useProjectActions(
|
||||
patchPenSetWeight,
|
||||
seedStandardPenSet,
|
||||
loadStandards,
|
||||
updateStandards,
|
||||
addCustomPalette,
|
||||
renameCustomPalette,
|
||||
deleteCustomPalette,
|
||||
|
||||
Reference in new issue
Block a user