@things-factory/figure-ui 10.1.76 → 10.1.78
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 +42 -23
- package/dist-client/modeller/editor.d.ts +9 -0
- package/dist-client/modeller/editor.js +50 -24
- package/dist-client/modeller/editor.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/test/browser/modeller.check.mjs +18 -12
- package/test/links.test.ts +1 -1
- package/test/parts-wiring.test.ts +13 -0
- package/test/refusals.test.ts +6 -3
- package/test/theme.test.ts +2 -4
- package/translations/en.json +2 -2
- package/translations/ja.json +2 -2
- package/translations/ko.json +2 -2
- package/translations/ms.json +2 -2
- package/translations/zh.json +2 -2
- package/dist-client/graphql/v3-store.d.ts +0 -3
- package/dist-client/graphql/v3-store.js +0 -39
- package/dist-client/graphql/v3-store.js.map +0 -1
- package/dist-client/modeller/figure-v3-capability.d.ts +0 -22
- package/dist-client/modeller/figure-v3-capability.js +0 -141
- package/dist-client/modeller/figure-v3-capability.js.map +0 -1
- package/dist-client/modeller/figure-v3-clips.d.ts +0 -31
- package/dist-client/modeller/figure-v3-clips.js +0 -268
- package/dist-client/modeller/figure-v3-clips.js.map +0 -1
- package/dist-client/modeller/figure-v3-controls.d.ts +0 -36
- package/dist-client/modeller/figure-v3-controls.js +0 -226
- package/dist-client/modeller/figure-v3-controls.js.map +0 -1
- package/dist-client/modeller/figure-v3-first-save.d.ts +0 -20
- package/dist-client/modeller/figure-v3-first-save.js +0 -118
- package/dist-client/modeller/figure-v3-first-save.js.map +0 -1
- package/dist-client/modeller/figure-v3-links.d.ts +0 -77
- package/dist-client/modeller/figure-v3-links.js +0 -649
- package/dist-client/modeller/figure-v3-links.js.map +0 -1
- package/dist-client/modeller/figure-v3-material.d.ts +0 -39
- package/dist-client/modeller/figure-v3-material.js +0 -323
- package/dist-client/modeller/figure-v3-material.js.map +0 -1
- package/dist-client/modeller/figure-v3-parts.d.ts +0 -69
- package/dist-client/modeller/figure-v3-parts.js +0 -559
- package/dist-client/modeller/figure-v3-parts.js.map +0 -1
- package/dist-client/modeller/figure-v3-preview.d.ts +0 -34
- package/dist-client/modeller/figure-v3-preview.js +0 -346
- package/dist-client/modeller/figure-v3-preview.js.map +0 -1
- package/dist-client/modeller/figure-v3-properties.d.ts +0 -45
- package/dist-client/modeller/figure-v3-properties.js +0 -239
- package/dist-client/modeller/figure-v3-properties.js.map +0 -1
- package/dist-client/modeller/figure-v3-recipe-catalog.d.ts +0 -38
- package/dist-client/modeller/figure-v3-recipe-catalog.js +0 -399
- package/dist-client/modeller/figure-v3-recipe-catalog.js.map +0 -1
- package/dist-client/modeller/figure-v3-verdict.d.ts +0 -64
- package/dist-client/modeller/figure-v3-verdict.js +0 -787
- package/dist-client/modeller/figure-v3-verdict.js.map +0 -1
- package/dist-client/modeller/v3-ai-proposal.d.ts +0 -51
- package/dist-client/modeller/v3-ai-proposal.js +0 -64
- package/dist-client/modeller/v3-ai-proposal.js.map +0 -1
- package/dist-client/modeller/v3-align.d.ts +0 -30
- package/dist-client/modeller/v3-align.js +0 -75
- package/dist-client/modeller/v3-align.js.map +0 -1
- package/dist-client/modeller/v3-canvas.d.ts +0 -72
- package/dist-client/modeller/v3-canvas.js +0 -379
- package/dist-client/modeller/v3-canvas.js.map +0 -1
- package/dist-client/modeller/v3-clips.d.ts +0 -39
- package/dist-client/modeller/v3-clips.js +0 -58
- package/dist-client/modeller/v3-clips.js.map +0 -1
- package/dist-client/modeller/v3-controls.d.ts +0 -28
- package/dist-client/modeller/v3-controls.js +0 -28
- package/dist-client/modeller/v3-controls.js.map +0 -1
- package/dist-client/modeller/v3-editor.d.ts +0 -203
- package/dist-client/modeller/v3-editor.js +0 -1526
- package/dist-client/modeller/v3-editor.js.map +0 -1
- package/dist-client/modeller/v3-fields.d.ts +0 -45
- package/dist-client/modeller/v3-fields.js +0 -83
- package/dist-client/modeller/v3-fields.js.map +0 -1
- package/dist-client/modeller/v3-figure-facts.d.ts +0 -35
- package/dist-client/modeller/v3-figure-facts.js +0 -55
- package/dist-client/modeller/v3-figure-facts.js.map +0 -1
- package/dist-client/modeller/v3-first-save.d.ts +0 -17
- package/dist-client/modeller/v3-first-save.js +0 -26
- package/dist-client/modeller/v3-first-save.js.map +0 -1
- package/dist-client/modeller/v3-gizmo.d.ts +0 -72
- package/dist-client/modeller/v3-gizmo.js +0 -111
- package/dist-client/modeller/v3-gizmo.js.map +0 -1
- package/dist-client/modeller/v3-help.d.ts +0 -18
- package/dist-client/modeller/v3-help.js +0 -37
- package/dist-client/modeller/v3-help.js.map +0 -1
- package/dist-client/modeller/v3-joint-drag.d.ts +0 -19
- package/dist-client/modeller/v3-joint-drag.js +0 -97
- package/dist-client/modeller/v3-joint-drag.js.map +0 -1
- package/dist-client/modeller/v3-joint-fan.d.ts +0 -9
- package/dist-client/modeller/v3-joint-fan.js +0 -276
- package/dist-client/modeller/v3-joint-fan.js.map +0 -1
- package/dist-client/modeller/v3-keys.d.ts +0 -22
- package/dist-client/modeller/v3-keys.js +0 -26
- package/dist-client/modeller/v3-keys.js.map +0 -1
- package/dist-client/modeller/v3-links.d.ts +0 -267
- package/dist-client/modeller/v3-links.js +0 -480
- package/dist-client/modeller/v3-links.js.map +0 -1
- package/dist-client/modeller/v3-live.d.ts +0 -37
- package/dist-client/modeller/v3-live.js +0 -68
- package/dist-client/modeller/v3-live.js.map +0 -1
- package/dist-client/modeller/v3-maturity.d.ts +0 -120
- package/dist-client/modeller/v3-maturity.js +0 -313
- package/dist-client/modeller/v3-maturity.js.map +0 -1
- package/dist-client/modeller/v3-occupancy.d.ts +0 -18
- package/dist-client/modeller/v3-occupancy.js +0 -24
- package/dist-client/modeller/v3-occupancy.js.map +0 -1
- package/dist-client/modeller/v3-palette.d.ts +0 -7
- package/dist-client/modeller/v3-palette.js +0 -46
- package/dist-client/modeller/v3-palette.js.map +0 -1
- package/dist-client/modeller/v3-preview-model.d.ts +0 -47
- package/dist-client/modeller/v3-preview-model.js +0 -68
- package/dist-client/modeller/v3-preview-model.js.map +0 -1
- package/dist-client/modeller/v3-product-session.d.ts +0 -510
- package/dist-client/modeller/v3-product-session.js +0 -157
- package/dist-client/modeller/v3-product-session.js.map +0 -1
- package/dist-client/modeller/v3-recipe-source.d.ts +0 -8
- package/dist-client/modeller/v3-recipe-source.js +0 -14
- package/dist-client/modeller/v3-recipe-source.js.map +0 -1
- package/dist-client/modeller/v3-recipes.d.ts +0 -37
- package/dist-client/modeller/v3-recipes.js +0 -103
- package/dist-client/modeller/v3-recipes.js.map +0 -1
- package/dist-client/modeller/v3-refusals.d.ts +0 -68
- package/dist-client/modeller/v3-refusals.js +0 -142
- package/dist-client/modeller/v3-refusals.js.map +0 -1
- package/dist-client/modeller/v3-renderer.d.ts +0 -40
- package/dist-client/modeller/v3-renderer.js +0 -73
- package/dist-client/modeller/v3-renderer.js.map +0 -1
- package/dist-client/modeller/v3-stage-model.d.ts +0 -39
- package/dist-client/modeller/v3-stage-model.js +0 -147
- package/dist-client/modeller/v3-stage-model.js.map +0 -1
- package/dist-client/modeller/v3-thumbnail.d.ts +0 -3
- package/dist-client/modeller/v3-thumbnail.js +0 -75
- package/dist-client/modeller/v3-thumbnail.js.map +0 -1
- package/dist-client/pages/figure-v3-modeller-page.d.ts +0 -102
- package/dist-client/pages/figure-v3-modeller-page.js +0 -548
- package/dist-client/pages/figure-v3-modeller-page.js.map +0 -1
- package/dist-client/tsconfig.chk.tsbuildinfo +0 -1
- package/dist-client/tsconfig.fui.tsbuildinfo +0 -1
- package/dist-client/tsconfig.scratch-fm.tsbuildinfo +0 -1
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { LitElement, html, css, nothing } from 'lit';
|
|
3
|
-
import { customElement, property, state } from 'lit/decorators.js';
|
|
4
|
-
import { i18next } from '@operato/i18n';
|
|
5
|
-
import { closePopup } from '@operato/popup';
|
|
6
|
-
import '@operato/popup/ox-popup-actions.js';
|
|
7
|
-
import { CommonPopupStyles, FormFieldStyles } from '@operato/styles';
|
|
8
|
-
import '@material/web/button/filled-button.js';
|
|
9
|
-
import '@material/web/button/text-button.js';
|
|
10
|
-
import { firstSaveRefusalOf, releasableType, typeOf } from './v3-first-save.js';
|
|
11
|
-
/**
|
|
12
|
-
* The first save of a new figure: its type and its name, asked once, in the suite's popup look.
|
|
13
|
-
* Closes with the answer, or with nothing when cancelled -- then nothing is saved.
|
|
14
|
-
*/
|
|
15
|
-
let FigureV3FirstSave = class FigureV3FirstSave extends LitElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
/** The type the figure has so far -- empty for a temporary one, which is not offered. */
|
|
19
|
-
this.type = '';
|
|
20
|
-
this.name = '';
|
|
21
|
-
/** Type names already used in this domain. */
|
|
22
|
-
this.taken = [];
|
|
23
|
-
this.refusal = null;
|
|
24
|
-
this.onKey = (e) => {
|
|
25
|
-
if (e.key === 'Enter' && !e.isComposing)
|
|
26
|
-
this.confirm();
|
|
27
|
-
};
|
|
28
|
-
this.confirm = () => {
|
|
29
|
-
this.refusal = firstSaveRefusalOf(this.type, this.taken);
|
|
30
|
-
if (this.refusal)
|
|
31
|
-
return;
|
|
32
|
-
closePopup(this, { type: this.type, name: this.name.trim() || this.type });
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
static { this.styles = [
|
|
36
|
-
FormFieldStyles,
|
|
37
|
-
CommonPopupStyles,
|
|
38
|
-
css `
|
|
39
|
-
/* The popup's height is a share of the window (small is 40%): on a low window the buttons must still be reached. */
|
|
40
|
-
:host {
|
|
41
|
-
overflow-y: auto;
|
|
42
|
-
}
|
|
43
|
-
div[field] {
|
|
44
|
-
display: grid;
|
|
45
|
-
gap: 4px;
|
|
46
|
-
}
|
|
47
|
-
div[field] label {
|
|
48
|
-
font-size: var(--popup-font-size-small);
|
|
49
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
50
|
-
}
|
|
51
|
-
div[field] input {
|
|
52
|
-
box-sizing: border-box;
|
|
53
|
-
width: 100%;
|
|
54
|
-
}
|
|
55
|
-
input[type-field] {
|
|
56
|
-
font-family: var(--mono-font, monospace);
|
|
57
|
-
}
|
|
58
|
-
`
|
|
59
|
-
]; }
|
|
60
|
-
render() {
|
|
61
|
-
return html `
|
|
62
|
-
<div class="what">${i18next.t('figure.text.save-new-figure-desc')}</div>
|
|
63
|
-
<div field>
|
|
64
|
-
<label for="type">${i18next.t('figure.label.figure-type')}</label>
|
|
65
|
-
<input
|
|
66
|
-
id="type"
|
|
67
|
-
type-field
|
|
68
|
-
autofocus
|
|
69
|
-
.value=${this.type}
|
|
70
|
-
placeholder=${i18next.t('figure.text.figure-type-example')}
|
|
71
|
-
@input=${(e) => {
|
|
72
|
-
this.type = typeOf(e.target.value);
|
|
73
|
-
e.target.value = this.type;
|
|
74
|
-
this.refusal = null;
|
|
75
|
-
}}
|
|
76
|
-
@keydown=${this.onKey}
|
|
77
|
-
/>
|
|
78
|
-
${this.type && !releasableType(this.type) ? html `<div class="note">${i18next.t('figure.text.type-name-will-not-release')}</div>` : nothing}
|
|
79
|
-
</div>
|
|
80
|
-
<div field>
|
|
81
|
-
<label for="name">${i18next.t('figure.label.name')}</label>
|
|
82
|
-
<input
|
|
83
|
-
id="name"
|
|
84
|
-
.value=${this.name}
|
|
85
|
-
placeholder=${i18next.t('figure.text.figure-name-example')}
|
|
86
|
-
@input=${(e) => (this.name = e.target.value)}
|
|
87
|
-
@keydown=${this.onKey}
|
|
88
|
-
/>
|
|
89
|
-
</div>
|
|
90
|
-
${this.refusal ? html `<div class="failure" role="alert">${i18next.t(this.refusal.key, { type: this.refusal.type })}</div>` : nothing}
|
|
91
|
-
<ox-popup-actions>
|
|
92
|
-
<md-text-button slot="cancel" @click=${() => closePopup(this)}>${i18next.t('figure.button.cancel')}</md-text-button>
|
|
93
|
-
<md-filled-button slot="confirm" ?disabled=${!this.type} @click=${this.confirm}>${i18next.t('figure.button.save')}</md-filled-button>
|
|
94
|
-
</ox-popup-actions>
|
|
95
|
-
`;
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
__decorate([
|
|
99
|
-
property(),
|
|
100
|
-
__metadata("design:type", Object)
|
|
101
|
-
], FigureV3FirstSave.prototype, "type", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
property(),
|
|
104
|
-
__metadata("design:type", Object)
|
|
105
|
-
], FigureV3FirstSave.prototype, "name", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
property({ attribute: false }),
|
|
108
|
-
__metadata("design:type", Array)
|
|
109
|
-
], FigureV3FirstSave.prototype, "taken", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
state(),
|
|
112
|
-
__metadata("design:type", Object)
|
|
113
|
-
], FigureV3FirstSave.prototype, "refusal", void 0);
|
|
114
|
-
FigureV3FirstSave = __decorate([
|
|
115
|
-
customElement('figure-v3-first-save')
|
|
116
|
-
], FigureV3FirstSave);
|
|
117
|
-
export { FigureV3FirstSave };
|
|
118
|
-
//# sourceMappingURL=figure-v3-first-save.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"figure-v3-first-save.js","sourceRoot":"","sources":["../../client/modeller/figure-v3-first-save.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,oCAAoC,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,uCAAuC,CAAA;AAC9C,OAAO,qCAAqC,CAAA;AAE5C,OAAO,EAAE,kBA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D,iBAAiB;IAD7B,aAAa,CAAC,sBAAsB,CAAC;GACzB,iBAAiB,CAiF7B","sourcesContent":["import { LitElement, html, css, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { i18next } from '@operato/i18n'\nimport { closePopup } from '@operato/popup'\nimport '@operato/popup/ox-popup-actions.js'\nimport { CommonPopupStyles, FormFieldStyles } from '@operato/styles'\nimport '@material/web/button/filled-button.js'\nimport '@material/web/button/text-button.js'\n\nimport { firstSaveRefusalOf, releasableType, typeOf, type FirstSave } from './v3-first-save.js'\n\n/**\n * The first save of a new figure: its type and its name, asked once, in the suite's popup look.\n * Closes with the answer, or with nothing when cancelled -- then nothing is saved.\n */\n@customElement('figure-v3-first-save')\nexport class FigureV3FirstSave extends LitElement {\n static styles = [\n FormFieldStyles,\n CommonPopupStyles,\n css`\n /* The popup's height is a share of the window (small is 40%): on a low window the buttons must still be reached. */\n :host {\n overflow-y: auto;\n }\n div[field] {\n display: grid;\n gap: 4px;\n }\n div[field] label {\n font-size: var(--popup-font-size-small);\n color: var(--md-sys-color-on-surface-variant);\n }\n div[field] input {\n box-sizing: border-box;\n width: 100%;\n }\n input[type-field] {\n font-family: var(--mono-font, monospace);\n }\n `\n ]\n\n /** The type the figure has so far -- empty for a temporary one, which is not offered. */\n @property() type = ''\n @property() name = ''\n /** Type names already used in this domain. */\n @property({ attribute: false }) taken: string[] = []\n @state() private refusal: { key: string; type?: string } | null = null\n\n render() {\n return html`\n <div class=\"what\">${i18next.t('figure.text.save-new-figure-desc')}</div>\n <div field>\n <label for=\"type\">${i18next.t('figure.label.figure-type')}</label>\n <input\n id=\"type\"\n type-field\n autofocus\n .value=${this.type}\n placeholder=${i18next.t('figure.text.figure-type-example')}\n @input=${(e: Event) => {\n this.type = typeOf((e.target as HTMLInputElement).value)\n ;(e.target as HTMLInputElement).value = this.type\n this.refusal = null\n }}\n @keydown=${this.onKey}\n />\n ${this.type && !releasableType(this.type) ? html`<div class=\"note\">${i18next.t('figure.text.type-name-will-not-release')}</div>` : nothing}\n </div>\n <div field>\n <label for=\"name\">${i18next.t('figure.label.name')}</label>\n <input\n id=\"name\"\n .value=${this.name}\n placeholder=${i18next.t('figure.text.figure-name-example')}\n @input=${(e: Event) => (this.name = (e.target as HTMLInputElement).value)}\n @keydown=${this.onKey}\n />\n </div>\n ${this.refusal ? html`<div class=\"failure\" role=\"alert\">${i18next.t(this.refusal.key, { type: this.refusal.type })}</div>` : nothing}\n <ox-popup-actions>\n <md-text-button slot=\"cancel\" @click=${() => closePopup(this)}>${i18next.t('figure.button.cancel')}</md-text-button>\n <md-filled-button slot=\"confirm\" ?disabled=${!this.type} @click=${this.confirm}>${i18next.t('figure.button.save')}</md-filled-button>\n </ox-popup-actions>\n `\n }\n\n private onKey = (e: KeyboardEvent) => {\n if (e.key === 'Enter' && !e.isComposing) this.confirm()\n }\n\n private confirm = () => {\n this.refusal = firstSaveRefusalOf(this.type, this.taken)\n if (this.refusal) return\n closePopup(this, { type: this.type, name: this.name.trim() || this.type } satisfies FirstSave)\n }\n}\n"]}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import '@material/web/icon/icon.js';
|
|
2
|
-
import { LitElement, nothing } from 'lit';
|
|
3
|
-
import type { V3Asset } from '@hatiolab/figure-model';
|
|
4
|
-
declare const FigureV3Links_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
5
|
-
/**
|
|
6
|
-
* What a part is tied to — its size response, what it is fastened to, how it moves.
|
|
7
|
-
*
|
|
8
|
-
* 「Build Once, Fit Anywhere」 lives here: a dimension that follows the instance size or another part is what lets
|
|
9
|
-
* a figure be placed at any size, and a part fastened to the face it rests on is what keeps it there when that
|
|
10
|
-
* happens. The release gate refuses a figure that falls apart when resized, and tells the author to fasten the
|
|
11
|
-
* parts that come away — this is where they do it. Motion is a joint: a slide or a turn driven by a control.
|
|
12
|
-
*
|
|
13
|
-
* The sections are dimensions, placement and joint, in that order. Every
|
|
14
|
-
* change is one figure-model authoring command, sent as `v3-command` and run by the editor through the session — one
|
|
15
|
-
* step of the undo history. Choices the command would refuse (a round body fastened, a size following an instance
|
|
16
|
-
* size the figure does not declare) are not offered, so the author is not sent into a refusal.
|
|
17
|
-
*/
|
|
18
|
-
export declare class FigureV3Links extends FigureV3Links_base {
|
|
19
|
-
private readonly help;
|
|
20
|
-
static styles: import("lit").CSSResult[];
|
|
21
|
-
/** The asset being edited. */
|
|
22
|
-
asset?: V3Asset;
|
|
23
|
-
/** The selected part. */
|
|
24
|
-
partId: string;
|
|
25
|
-
/** The part's own extent along its axes now, in mm — what a dimension is fixed at when it stops following. */
|
|
26
|
-
dims?: [number, number, number];
|
|
27
|
-
locked: boolean;
|
|
28
|
-
/** Which ties this shows: the part's shape (size and placement, in 속성), its places (자리·능력) or its motion (움직임). */
|
|
29
|
-
section: 'shape' | 'places' | 'motion';
|
|
30
|
-
private fasten;
|
|
31
|
-
private motion;
|
|
32
|
-
private place;
|
|
33
|
-
private row;
|
|
34
|
-
/** The motion form is open over the part's own motion, to change it where it is. */
|
|
35
|
-
private editingMotion;
|
|
36
|
-
willUpdate(changed: Map<string, unknown>): void;
|
|
37
|
-
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
38
|
-
/** Where things are held on this part: a seat things rest on, or a grip things are held in. */
|
|
39
|
-
private renderPlaces;
|
|
40
|
-
/** The figure holds things: `Capacity` and `Holdable`, the ladder's middle rung. One part edit, one undo step. */
|
|
41
|
-
private declareHolding;
|
|
42
|
-
private renderDimensions;
|
|
43
|
-
/** The same source, the same share, a new difference: a leaf the opening less its gaps (link-dimension's `plus`). */
|
|
44
|
-
private followPlus;
|
|
45
|
-
private follow;
|
|
46
|
-
/**
|
|
47
|
-
* Positions worked out from other values, each with the way to
|
|
48
|
-
* keep it where it is. This is the way out the release gate names when a resize leaves a part in the air.
|
|
49
|
-
*/
|
|
50
|
-
private renderPositions;
|
|
51
|
-
/**
|
|
52
|
-
* A new aim for the fastening: where on the face is filled in as where the part stands now, so fastening it keeps it
|
|
53
|
-
* there (`placeKeptOf`). The author changes it from there.
|
|
54
|
-
*/
|
|
55
|
-
private aimAt;
|
|
56
|
-
private renderFastening;
|
|
57
|
-
/**
|
|
58
|
-
* Where on the target face the part sits, on the two axes across it: centred, level with the target's edge on
|
|
59
|
-
* either side, or a distance off centre. A door hung level with the frame's front edge turns about that edge.
|
|
60
|
-
*/
|
|
61
|
-
private renderAlignment;
|
|
62
|
-
/**
|
|
63
|
-
* Making the part a row across what it is fastened to (figure-model `make-repeat`): along one of the axes across its
|
|
64
|
-
* face, copies a pitch apart filling the parent's length, or a count spread over it. Once made, the row's own section
|
|
65
|
-
* (the editor's) shows it and takes it away.
|
|
66
|
-
*/
|
|
67
|
-
private renderRow;
|
|
68
|
-
/**
|
|
69
|
-
* When the part is drawn: always, or while a control is at least a value -- a lamp lit while the gate is open. One
|
|
70
|
-
* part edit (`set-visibility`), one step. Offered once the figure has a control; a motion is what makes one.
|
|
71
|
-
*/
|
|
72
|
-
private renderShown;
|
|
73
|
-
private renderMotion;
|
|
74
|
-
private setKind;
|
|
75
|
-
private command;
|
|
76
|
-
}
|
|
77
|
-
export {};
|