Ebene-Schraffur editierbar im Kategorie-Dialog
Nach-Ebene-Schraffur war in der Resolve-Logik bereits fertig, aber LayerCategory.hatch liess sich im Kategorie-Editor nicht setzen. Dropdown mit Vorschau ergaenzt, patcht ueber patchCategory.
This commit is contained in:
+25
@@ -64,6 +64,7 @@ import { Viewport3D } from "./viewport/Viewport3D";
|
||||
import type { DisplayResolver, ViewportContextInfo } from "./viewport/Viewport3D";
|
||||
import { ResourceManager } from "./ui/ResourceManager";
|
||||
import type { ResourceManagerHandlers } from "./ui/ResourceManager";
|
||||
import { HatchSwatch } from "./ui/hatchPreview";
|
||||
import { TopBar } from "./ui/TopBar";
|
||||
import { TextEditorDialog } from "./ui/TextEditorDialog";
|
||||
import { RoomStampEditor } from "./panels/RoomStampEditor";
|
||||
@@ -3372,6 +3373,30 @@ export default function App() {
|
||||
<span className="editor-unit">{t("editor.unit.mm")}</span>
|
||||
</span>
|
||||
</EditorField>
|
||||
<EditorField label={t("editor.hatch")}>
|
||||
<span className="editor-hatch">
|
||||
<select
|
||||
value={cat.hatch ?? ""}
|
||||
onChange={(e) =>
|
||||
patchCategory(cat.code, {
|
||||
hatch: e.target.value || undefined,
|
||||
})
|
||||
}
|
||||
>
|
||||
<option value="">{t("resources.viewHatch.none")}</option>
|
||||
{project.hatches.map((h) => (
|
||||
<option key={h.id} value={h.id}>
|
||||
{h.name}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
{cat.hatch &&
|
||||
(() => {
|
||||
const h = project.hatches.find((ht) => ht.id === cat.hatch);
|
||||
return h ? <HatchSwatch hatch={h} size={26} /> : null;
|
||||
})()}
|
||||
</span>
|
||||
</EditorField>
|
||||
</InlineEditor>
|
||||
);
|
||||
})()}
|
||||
|
||||
Reference in New Issue
Block a user