[137] Achsraster im Schnitt/in der Ansicht anwählbar, Schlagschatten der Ansicht wählbar (Schalter in der Objekt-Info), Schriftfeld auf dem Blatt bearbeitbar, Nordpfeil/Massstabsbalken des Präsentationsplans als Gruppen
This commit is contained in:
13 files changed
+160
-11
No files matched your search
@@ -12,7 +12,7 @@ export function createPresentationSheet(o: PresentationOptions): string | null {
|
||||
const res = presentationSheetOps(
|
||||
st.project,
|
||||
o,
|
||||
{ sheetName: t("presentation.sheetName"), masterName: t("presentation.masterName", { format }), north: t("presentation.north") },
|
||||
{ sheetName: t("presentation.sheetName"), masterName: t("presentation.masterName", { format }), north: t("presentation.north"), northGroup: t("presentation.northGroup"), scaleBarGroup: t("presentation.scaleBarGroup") },
|
||||
String(Date.now()),
|
||||
);
|
||||
if (!res) {
|
||||
|
||||
@@ -186,7 +186,11 @@ export function useGripEditing(opts: {
|
||||
const gripOwnerRange: [number, number][] = [];
|
||||
|
||||
// Die Einzel-ID leitet sich aus der Menge ab ([130]) — die Menge genügt.
|
||||
const effectiveDrawingIds = selectedDrawingIds;
|
||||
// [137] Im Schnitt/in der Ansicht nur die 2D-Elemente der Blatt-Ebene: ein dort angewähltes Achsraster
|
||||
// (Grundriss-Element, im Blatt projiziert) hat keine Griffe/kein Verschieben in Blatt-Koordinaten.
|
||||
const effectiveDrawingIds = modelEditable
|
||||
? selectedDrawingIds
|
||||
: selectedDrawingIds.filter((id) => project.drawings2d.find((x) => x.id === id)?.levelId === levelId);
|
||||
|
||||
// Griff-Grenzen (s. gripLimits.ts): grosse Mehrfachauswahlen ohne Griffe, ein einzeln gewähltes
|
||||
// Element immer mit Griffen (Kataster-Parzellen mit tausenden Stützpunkten).
|
||||
@@ -1039,6 +1043,7 @@ export function useGripEditing(opts: {
|
||||
? { x: prev.total.x + delta.x, y: prev.total.y + delta.y }
|
||||
: delta;
|
||||
if (!deferrableDrawing(target.drawingId)) return;
|
||||
if (project.drawings2d.find((x) => x.id === target.drawingId)?.levelId !== sh.levelId) return; // [137] Achsraster
|
||||
pendingBodyRef.current = { drawingId: target.drawingId, total };
|
||||
setDraft({ preview: bodyPreviewShapes(), vertices: [], snap: null });
|
||||
return;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// Bezeichner englisch, Kommentare deutsch (CONVENTIONS.md).
|
||||
|
||||
import { useEffect, useMemo, useRef } from "react";
|
||||
import type { Layout, LayoutLegend, LayoutTable, LayoutViewport, Project } from "../model/types";
|
||||
import type { Layout, LayoutLegend, LayoutTable, LayoutTitleBlock, LayoutViewport, Project } from "../model/types";
|
||||
import { addItems, patchItem } from "../core";
|
||||
import type { ProjectSlice } from "./projectSlice";
|
||||
import {
|
||||
@@ -104,6 +104,19 @@ export function useSheetPane(opts: {
|
||||
onPatchLegend: (legendId: string, patch: Partial<Omit<LayoutLegend, "id">>) =>
|
||||
patchOpenLayout(openId(), (l) => patchLegend(l, legendId, patch), `legend-${legendId}`),
|
||||
onRemoveLegend: (legendId: string) => patchOpenLayout(openId(), (l) => removeLegend(l, legendId)),
|
||||
// [137] Schriftfeld: Blatt-Felder am Layout, gemeinsame am Master (Tippen = ein Undo-Schritt je Feld).
|
||||
onPatchTitleBlock: (layoutPatch: Partial<Pick<Layout, "name" | "planNumber" | "revision">>, masterPatch?: Partial<LayoutTitleBlock>) => {
|
||||
const id = openId();
|
||||
const key = `titleBlock:${id}:${Object.keys(layoutPatch).join()}${Object.keys(masterPatch ?? {}).join()}`;
|
||||
if (Object.keys(layoutPatch).length > 0) patchOpenLayout(id, (l) => ({ ...l, ...layoutPatch }), key);
|
||||
if (masterPatch) {
|
||||
applyChange((p) => {
|
||||
const lay = (p.layouts ?? []).find((l) => l.id === id);
|
||||
const m = (p.masterLayouts ?? []).find((x) => x.id === lay?.masterId);
|
||||
return m ? patchItem(p, "masterLayouts", m.id, { titleBlock: { ...m.titleBlock, ...masterPatch } }) : [];
|
||||
}, key);
|
||||
}
|
||||
},
|
||||
});
|
||||
const open = !!activeLayout && !!sheetLevel && activeLevelId === sheetLevel.id;
|
||||
return useMemo(
|
||||
|
||||
Reference in new issue
Block a user