@things-factory/figure-ui 10.1.86 → 10.1.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/modeller/editor.ts +8 -2
- package/client/modeller/figure-section-editor.ts +244 -85
- package/client/modeller/figure-section-panel.ts +10 -10
- package/client/modeller/section-drawing.ts +55 -2
- package/dist-client/modeller/editor.js +8 -2
- package/dist-client/modeller/editor.js.map +1 -1
- package/dist-client/modeller/figure-section-editor.d.ts +36 -11
- package/dist-client/modeller/figure-section-editor.js +215 -75
- package/dist-client/modeller/figure-section-editor.js.map +1 -1
- package/dist-client/modeller/figure-section-panel.js +10 -10
- package/dist-client/modeller/figure-section-panel.js.map +1 -1
- package/dist-client/modeller/section-drawing.d.ts +20 -1
- package/dist-client/modeller/section-drawing.js +42 -1
- package/dist-client/modeller/section-drawing.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/test/section-editor.test.ts +44 -4
- package/translations/en.json +11 -1
- package/translations/ja.json +11 -1
- package/translations/ko.json +11 -1
- package/translations/ms.json +11 -1
- package/translations/zh.json +11 -1
|
@@ -7,7 +7,7 @@ import { notify } from '@operato/layout';
|
|
|
7
7
|
import { OxPrompt } from '@operato/popup';
|
|
8
8
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
9
|
import { live } from 'lit/directives/live.js';
|
|
10
|
-
import { PART_LIMIT, parseFigureRecipe, resolveFigureRecipe, figurePartCountOf, figureRecipeIdFor, parseFigureAsset, figureSizeEditChanges, figureScaleAnchorOf, figurePlaneAlignChanges, figurePartFaceOf, figureRowOf, figureFaceOverhangOf, figureRoomOnlyInputsOf, figureRoomRefitOf } from '@hatiolab/figure-model';
|
|
10
|
+
import { PART_LIMIT, parseFigureRecipe, resolveFigureRecipe, figurePartCountOf, figureRecipeIdFor, parseFigureAsset, figureSizeEditChanges, figureScaleAnchorOf, figureSectionMeasuresOf, figurePlaneAlignChanges, figurePartFaceOf, figureRowOf, figureFaceOverhangOf, figureRoomOnlyInputsOf, figureRoomRefitOf } from '@hatiolab/figure-model';
|
|
11
11
|
import './figure-recipe-catalog.js';
|
|
12
12
|
import { captureFigureThumbnail } from './thumbnail.js';
|
|
13
13
|
import { drawableFigureParts } from './renderer.js';
|
|
@@ -1823,10 +1823,16 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
1823
1823
|
/** The section editor over the canvas, the figure behind it drawing what the working points make. */
|
|
1824
1824
|
renderSectionEditor(geometry) {
|
|
1825
1825
|
const part = geometry.find(g => ownerOf(g.id) === this.selected);
|
|
1826
|
-
|
|
1826
|
+
/* A door frame's section is its own width, height, jamb and head: its fields edit it, not an outline. */
|
|
1827
|
+
if (!part?.shape?.extrusion || part.shape.dimensions.jamb !== undefined)
|
|
1827
1828
|
return nothing;
|
|
1829
|
+
const asset = this.asset();
|
|
1830
|
+
const measures = figureSectionMeasuresOf(asset, this.selected);
|
|
1831
|
+
const kept = figureScaleAnchorOf(asset, this.selected)?.[part.shape.extrusion.axis];
|
|
1828
1832
|
return html `<figure-section-editor
|
|
1829
1833
|
.body=${{ ...part, id: this.selected }}
|
|
1834
|
+
.measures=${measures}
|
|
1835
|
+
.kept=${kept}
|
|
1830
1836
|
.revision=${this.session?.read().revision ?? 0}
|
|
1831
1837
|
@command=${(e) => this.linkCommand(e.detail.action)}
|
|
1832
1838
|
@command-live=${(e) => this.holdAction(e.detail.action)}
|