@operato/slot-layout-editor 10.29.86 → 10.29.89

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.
@@ -38,6 +38,15 @@ export declare function removeTier<L extends SlotLayout>(layout: L, tierNo: numb
38
38
  /** Tier 가 선 Anchor, 적재 방식, Anchor 기준 배치 */
39
39
  export type TierPatch = Partial<Pick<SlotLayoutTier, 'anchorId' | 'mount' | 'position' | 'rotation'>>;
40
40
  export declare function updateTier<L extends SlotLayout>(layout: L, tierNo: number, patch: TierPatch): L;
41
+ /**
42
+ * Tier 가 면 크기를 따르게 하거나(ADR-0051 §4.3 결정 7) 그만두게 한다. 따르면 지금 숫자는 face 크기(와 그 위 공간)에서의 값이다.
43
+ * face 를 주지 않으면 따르지 않는다
44
+ */
45
+ export declare function setTierFollowsFace<L extends SlotLayout>(layout: L, tierNo: number, face: {
46
+ width: number;
47
+ depth: number;
48
+ height?: number;
49
+ } | undefined): L;
41
50
  /**
42
51
  * 층의 패턴을 바꾼다. 자리 규격은 그대로 두고 자리 수·간격은 지금 배치를 이어받는다.
43
52
  * CUSTOM 으로 바꾸면 지금 자리들의 위치·규격을 그대로 적어 둔다.
package/dist/src/draft.js CHANGED
@@ -50,6 +50,21 @@ export function updateTier(layout, tierNo, patch) {
50
50
  Object.assign(tier, clone(patch));
51
51
  return next;
52
52
  }
53
+ /**
54
+ * Tier 가 면 크기를 따르게 하거나(ADR-0051 §4.3 결정 7) 그만두게 한다. 따르면 지금 숫자는 face 크기(와 그 위 공간)에서의 값이다.
55
+ * face 를 주지 않으면 따르지 않는다
56
+ */
57
+ export function setTierFollowsFace(layout, tierNo, face) {
58
+ const next = clone(layout);
59
+ const tier = next.tiers.find(t => t.tierNo === tierNo);
60
+ if (!tier)
61
+ return next;
62
+ if (face)
63
+ tier.followsFace = clone(face);
64
+ else
65
+ delete tier.followsFace;
66
+ return next;
67
+ }
53
68
  // ── 패턴 ───────────────────────────────────────────────────────────────────
54
69
  const specOf = (l) => {
55
70
  if (l.pattern === 'CUSTOM') {
@@ -22,7 +22,8 @@ export const ISSUE_TEXT = {
22
22
  SLOTS_REQUIRED: 'At least one slot is required',
23
23
  SLOT_NUMBER_DUPLICATE: 'Slot {slotNo} is used twice',
24
24
  NOT_PERSISTABLE: 'Cannot be saved ({value})',
25
- ACCEPTS_EMPTY: 'The list of types it takes is empty; choose 「Any type」 to take any item'
25
+ ACCEPTS_EMPTY: 'The list of types it takes is empty; choose 「Any type」 to take any item',
26
+ FOLLOWS_FACE_TURN: 'A tier whose dimensions are a ratio (%) turns by 90° steps only'
26
27
  };
27
28
  export const t = (key, fallback, opts = {}) => i18next.t(`label.slot-layout.${key}`, { defaultValue: fallback, ...opts });
28
29
  /** 자리 공간 경고의 기본 문구. 번역 키는 label.slot-layout.space.{코드} */
@@ -103,6 +104,10 @@ const FIELD_OF_PATH = {
103
104
  'position.y': 'position-y',
104
105
  'position.z': 'position-z',
105
106
  rotation: 'tier-rotation',
107
+ followsFace: 'follows-face',
108
+ 'followsFace.width': 'follows-face',
109
+ 'followsFace.depth': 'follows-face',
110
+ 'followsFace.height': 'follows-face',
106
111
  layout: 'pattern',
107
112
  'layout.pattern': 'pattern',
108
113
  'layout.count': 'count',
@@ -14,7 +14,7 @@
14
14
  * 기본값을 쓰게 된 뒤 보일 값은 호스트가 options.effective 로 다시 준다.
15
15
  */
16
16
  import { LitElement } from 'lit';
17
- import { type SlotLayout, type SlotSpaceOptions } from '@hatiolab/things-scene';
17
+ import { type SlotLayout, type SlotLayoutTier, type SlotSpaceOptions } from '@hatiolab/things-scene';
18
18
  import { type HeldItem, type PresetSize, type SlotLayoutPreset } from './draft.js';
19
19
  import { type EditorIssue } from './issue-text.js';
20
20
  export interface SlotLayoutEditorNote {
@@ -52,6 +52,11 @@ export interface SlotLayoutEditorOptions<L extends SlotLayout = SlotLayout> {
52
52
  }[];
53
53
  /** Anchor 가 주는 적재면 크기 (Anchor 기준 X·Z). 그림에 면을 그리고, 자리가 면 밖으로 나가는지 알린다. 없으면 확인 불가로 보인다 */
54
54
  anchorFaces?: SlotSpaceOptions['anchorFaces'];
55
+ /**
56
+ * 각 Anchor 면 위에 남은 공간 (mm). 주면 「면 크기를 따름」 층의 높이도 그 공간을 따른다(ADR-0051 §4.3 결정 7).
57
+ * anchorFaces 가 있는 Anchor 위의 층만 면 크기를 따를 수 있다
58
+ */
59
+ anchorRooms?: Record<string, number>;
55
60
  /** 레이아웃 길이 단위 (예: mm). 그림과 칸 이름에 붙인다 */
56
61
  unit?: string;
57
62
  /** 받는 타입을 고르는 목록 (아이템 타입 코드·이름). 없으면 코드를 직접 적는다 */
@@ -76,6 +81,8 @@ export declare class OxSlotLayoutEditor extends OxSlotLayoutEditor_base {
76
81
  /** 개별 설정. 없으면 undefined */
77
82
  value: SlotLayout | undefined;
78
83
  options: SlotLayoutEditorOptions;
84
+ /** The faces the host has in hand (the part picked on its canvas): the tier on one of them is the one shown. */
85
+ focusAnchors: readonly string[] | undefined;
79
86
  draft: SlotLayout | undefined;
80
87
  tier: number;
81
88
  dirty: boolean;
@@ -86,11 +93,16 @@ export declare class OxSlotLayoutEditor extends OxSlotLayoutEditor_base {
86
93
  fitNote: string | undefined;
87
94
  private _drag;
88
95
  willUpdate(changed: Map<string, unknown>): void;
96
+ private _followFocus;
97
+ private _startUpdate;
89
98
  /** 편집 중인 값을 버리고 개별 설정(없으면 호스트 기본값)에서 다시 시작한다. 고른 Tier 는 남아 있으면 그대로 */
90
99
  reset(): void;
91
100
  private _startFromHost;
92
101
  get issues(): EditorIssue[];
93
- /** 자리끼리 겹치거나 면 밖으로 나가는 설정, 면 크기를 몰라 확인하지 못한 Anchor. 적용을 막지 않는다 */
102
+ /**
103
+ * 자리끼리 겹치거나 면 밖으로 나가는 설정, 면 크기를 몰라 확인하지 못한 Anchor. 적용을 막지 않는다. 면 크기를 따르는 층은
104
+ * 지금 면 크기에서의 레이아웃으로 본다(ADR-0051 §4.3 결정 7): 다른 크기의 배치에서 적을 때의 숫자로 재지 않는다
105
+ */
94
106
  get warnings(): EditorIssue[];
95
107
  /** 적용하면 뜻이 바뀌는 주소 (지금 적용된 값 기준) */
96
108
  get impact(): import("./draft.js").AddressImpact;
@@ -109,10 +121,20 @@ export declare class OxSlotLayoutEditor extends OxSlotLayoutEditor_base {
109
121
  /** 프리셋으로 다시 시작한다. 지금 값에 덧붙은 호스트 키(Tier 밖의 키)는 가져온다 */
110
122
  private _startFrom;
111
123
  private _renderDraft;
124
+ private _pickTier;
125
+ addTier(tier: Omit<SlotLayoutTier, 'tierNo'>): void;
126
+ private _faceAt;
112
127
  /** 복사한 Tier 를 골라 둔다. 같은 자리에 겹쳐 생기므로 바로 이어서 배치를 고친다 */
113
128
  private _copyTier;
114
129
  private _anchorName;
115
130
  private _unit;
131
+ /**
132
+ * What 100 % is for each length of a tier whose dimensions are a ratio of its face (ADR-0051 §4.3 decision 7): the face it
133
+ * was written at, the way `slotLayoutAtFaces` scales them. Position X·Z run along the anchor; pitches, offsets and slot
134
+ * sizes along the tier, which a quarter turn reads the other way round. Height is a ratio only when the room over the face
135
+ * was measured. A tier with fixed dimensions has no basis: its lengths are in the board unit.
136
+ */
137
+ private _basis;
116
138
  /** 고른 Tier 의 Anchor 면 위에서 본 자리 (Anchor 기준). 오른쪽이 +X, 위쪽이 −Z */
117
139
  private _renderPicture;
118
140
  /** 면 밖·겹침 경고. 고른 Tier 의 Anchor 면을 모른다는 것은 그림 아래에 이미 적었다 */
@@ -132,8 +154,11 @@ export declare class OxSlotLayoutEditor extends OxSlotLayoutEditor_base {
132
154
  private _onDragEnd;
133
155
  private _cancelDrag;
134
156
  private _row;
157
+ /** A number field. With a basis, a length is shown and taken as a percentage of it, and kept in the board unit at that basis. */
135
158
  private _num;
136
159
  private _seg;
160
+ /** What the percentages of a tier with ratio dimensions are of: the face as it is now (the same ratio as at the face they were written at). */
161
+ private _basisHint;
137
162
  private _renderTier;
138
163
  /** 자리를 어떻게 늘어놓는가: 패턴, 수, 간격, 방향, 1번 자리. 그리고 [면에 맞춤] */
139
164
  private _renderArrangement;
@@ -16,9 +16,10 @@
16
16
  import { __decorate } from "tslib";
17
17
  import { css, html, nothing, LitElement, svg } from 'lit';
18
18
  import { customElement, property, state } from 'lit/decorators.js';
19
+ import { live } from 'lit/directives/live.js';
19
20
  import { i18next, localize } from '@operato/i18n';
20
- import { persistenceIssues, rotatedFootprint, slotSpaceWarnings, validateSlotLayout } from '@hatiolab/things-scene';
21
- import { addCustomSlot, addressImpact, anchorFaceSlots, applyPreset, copyTier, fitTierToFace, heldItemStatuses, pitchToPoint, removeCustomSlot, removeTier, setTierPattern, updatePattern, updateSlotSpec, updateTier } from './draft.js';
21
+ import { persistenceIssues, rotatedFootprint, slotSpaceWarnings, slotLayoutAtFaces, validateSlotLayout } from '@hatiolab/things-scene';
22
+ import { addCustomSlot, addressImpact, anchorFaceSlots, applyPreset, copyTier, fitTierToFace, heldItemStatuses, pitchToPoint, removeCustomSlot, removeTier, setTierPattern, updatePattern, updateSlotSpec, updateTier, setTierFollowsFace } from './draft.js';
22
23
  import { fitFaceText, fitText, issueField, issueMessage, issueText as defaultIssueText, ISSUE_TEXT, spaceWarningLines, t } from './issue-text.js';
23
24
  const num = (e) => {
24
25
  const n = e.target.valueAsNumber;
@@ -33,6 +34,7 @@ const SLOT = '#1976d2';
33
34
  const FIELD_LABEL = {
34
35
  anchor: ['face', 'Face'],
35
36
  mount: ['mount', 'Mount'],
37
+ 'follows-face': ['follows-face', 'Dimensions'],
36
38
  'position-x': ['position-x', 'Position X'],
37
39
  'position-y': ['position-y', 'Position Y (height)'],
38
40
  'position-z': ['position-z', 'Position Z'],
@@ -108,6 +110,22 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
108
110
  };
109
111
  }
110
112
  willUpdate(changed) {
113
+ this._startUpdate(changed);
114
+ if (changed.has('focusAnchors') || changed.has('value'))
115
+ this._followFocus();
116
+ }
117
+ /* The host's part picked on its canvas opens the tier on that part's face; a face no tier stands on leaves it as it is. */
118
+ _followFocus() {
119
+ var _a, _b, _c;
120
+ const faces = this.focusAnchors;
121
+ const tiers = (_b = (_a = this.draft) === null || _a === void 0 ? void 0 : _a.tiers) !== null && _b !== void 0 ? _b : [];
122
+ if (!(faces === null || faces === void 0 ? void 0 : faces.length) || faces.includes((_c = tiers.find(x => x.tierNo === this.tier)) === null || _c === void 0 ? void 0 : _c.anchorId))
123
+ return;
124
+ const on = tiers.find(x => faces.includes(x.anchorId));
125
+ if (on)
126
+ this.tier = on.tierNo;
127
+ }
128
+ _startUpdate(changed) {
111
129
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
112
130
  // 호스트가 렌더마다 새 options 를 넘겨도 편집 중인 값을 잃지 않도록, 값이나 호스트 기본값이 바뀔 때만 다시 시작한다
113
131
  const before = changed.get('options');
@@ -163,12 +181,17 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
163
181
  // 저장 불가 검사는 검증을 통과한 값에만 보인다 (같은 문제를 두 번 적지 않는다)
164
182
  return unique.length ? unique : persistenceIssues(this.draft);
165
183
  }
166
- /** 자리끼리 겹치거나 면 밖으로 나가는 설정, 면 크기를 몰라 확인하지 못한 Anchor. 적용을 막지 않는다 */
184
+ /**
185
+ * 자리끼리 겹치거나 면 밖으로 나가는 설정, 면 크기를 몰라 확인하지 못한 Anchor. 적용을 막지 않는다. 면 크기를 따르는 층은
186
+ * 지금 면 크기에서의 레이아웃으로 본다(ADR-0051 §4.3 결정 7): 다른 크기의 배치에서 적을 때의 숫자로 재지 않는다
187
+ */
167
188
  get warnings() {
168
- var _a;
189
+ var _a, _b;
169
190
  if (!this.draft || this.issues.length)
170
191
  return [];
171
- return slotSpaceWarnings(this.draft, { anchorFaces: (_a = this.options) === null || _a === void 0 ? void 0 : _a.anchorFaces });
192
+ const faces = (_a = this.options) === null || _a === void 0 ? void 0 : _a.anchorFaces;
193
+ const sized = faces ? slotLayoutAtFaces(this.draft, faces, (_b = this.options) === null || _b === void 0 ? void 0 : _b.anchorRooms) : this.draft;
194
+ return slotSpaceWarnings(sized, { anchorFaces: faces });
172
195
  }
173
196
  /** 적용하면 뜻이 바뀌는 주소 (지금 적용된 값 기준) */
174
197
  get impact() {
@@ -350,7 +373,7 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
350
373
  return html `
351
374
  ${this._renderPicture(draft, tier.tierNo)}
352
375
  <div class="tiers">
353
- ${draft.tiers.map(x => html `<button data-tier=${x.tierNo} aria-pressed=${x.tierNo === tier.tierNo ? 'true' : 'false'} @click=${() => (this.tier = x.tierNo)}>
376
+ ${draft.tiers.map(x => html `<button data-tier=${x.tierNo} aria-pressed=${x.tierNo === tier.tierNo ? 'true' : 'false'} @click=${() => this._pickTier(x)}>
354
377
  ${t('tier-n', 'Tier {n}', { n: x.tierNo })}
355
378
  </button>`)}
356
379
  <button class="end" data-action="copy-tier" @click=${() => this._copyTier(draft, tier.tierNo)}>${t('copy-tier', 'Copy tier')}</button>
@@ -367,6 +390,39 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
367
390
  ${(_l = (_k = (_j = this.options) === null || _j === void 0 ? void 0 : _j.renderExtra) === null || _k === void 0 ? void 0 : _k.call(_j, draft, next => this._edit(next))) !== null && _l !== void 0 ? _l : nothing}
368
391
  `;
369
392
  }
393
+ /*
394
+ A tier picked here is said to the host with the face it stands on: a host with a canvas picks that face's part there
395
+ too, so the panel and the canvas speak of the same plate (figure modeller 2026-11-16).
396
+ */
397
+ _pickTier(tier) {
398
+ if (tier.tierNo === this.tier)
399
+ return;
400
+ this.tier = tier.tierNo;
401
+ this.dispatchEvent(new CustomEvent('slot-layout-tier-select', { detail: { tierNo: tier.tierNo, anchorId: tier.anchorId }, bubbles: true, composed: true }));
402
+ }
403
+ /*
404
+ A tier the host makes -- a place on a part's face, picked on its canvas -- added as the next tier and shown. Kept in
405
+ the draft like any edit: it goes out on Apply (figure modeller, ADR-0051 §4.3 decision 3).
406
+ */
407
+ addTier(tier) {
408
+ var _a;
409
+ const draft = (_a = this.draft) !== null && _a !== void 0 ? _a : { tiers: [] };
410
+ const tierNo = draft.tiers.length ? Math.max(...draft.tiers.map(t => t.tierNo)) + 1 : 1;
411
+ this.tier = tierNo;
412
+ this._edit({ ...structuredClone(draft), tiers: [...structuredClone(draft.tiers), { ...structuredClone(tier), tierNo }] });
413
+ }
414
+ /*
415
+ The face a tier would follow (ADR-0051 §4.3 decision 7): its size and, when the host measures it, the room over it.
416
+ None when the host gives no size for that face -- a holder whose anchors are not faces does not follow.
417
+ */
418
+ _faceAt(anchorId) {
419
+ var _a, _b, _c, _d;
420
+ const face = anchorId ? (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.anchorFaces) === null || _b === void 0 ? void 0 : _b[anchorId] : undefined;
421
+ if (!face || !(face.width > 0) || !(face.depth > 0))
422
+ return undefined;
423
+ const room = (_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.anchorRooms) === null || _d === void 0 ? void 0 : _d[anchorId];
424
+ return { width: face.width, depth: face.depth, ...(room && room > 0 ? { height: room } : {}) };
425
+ }
370
426
  /** 복사한 Tier 를 골라 둔다. 같은 자리에 겹쳐 생기므로 바로 이어서 배치를 고친다 */
371
427
  _copyTier(draft, tierNo) {
372
428
  const next = copyTier(draft, tierNo);
@@ -385,10 +441,36 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
385
441
  return a.part === id ? face : `${id} · ${face}`;
386
442
  return id;
387
443
  }
388
- _unit() {
444
+ _unit(basis) {
389
445
  var _a;
446
+ if (basis)
447
+ return html ` <span class="unit">%</span>`;
390
448
  return ((_a = this.options) === null || _a === void 0 ? void 0 : _a.unit) ? html ` <span class="unit">${this.options.unit}</span>` : nothing;
391
449
  }
450
+ /**
451
+ * What 100 % is for each length of a tier whose dimensions are a ratio of its face (ADR-0051 §4.3 decision 7): the face it
452
+ * was written at, the way `slotLayoutAtFaces` scales them. Position X·Z run along the anchor; pitches, offsets and slot
453
+ * sizes along the tier, which a quarter turn reads the other way round. Height is a ratio only when the room over the face
454
+ * was measured. A tier with fixed dimensions has no basis: its lengths are in the board unit.
455
+ */
456
+ _basis(tier) {
457
+ const at = tier.followsFace;
458
+ if (!at)
459
+ return {};
460
+ const quarter = (deg) => Math.abs(Math.round((deg !== null && deg !== void 0 ? deg : 0) / 90)) % 2 === 1;
461
+ const turned = quarter(tier.rotation);
462
+ const x = turned ? at.depth : at.width;
463
+ const z = turned ? at.width : at.depth;
464
+ return {
465
+ positionX: at.width,
466
+ positionZ: at.depth,
467
+ height: at.height,
468
+ x,
469
+ z,
470
+ slotWidth: (rotation) => (quarter(rotation) ? z : x),
471
+ slotDepth: (rotation) => (quarter(rotation) ? x : z)
472
+ };
473
+ }
392
474
  /** 고른 Tier 의 Anchor 면 위에서 본 자리 (Anchor 기준). 오른쪽이 +X, 위쪽이 −Z */
393
475
  _renderPicture(draft, tierNo) {
394
476
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -566,16 +648,18 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
566
648
  ${control} ${messages ? html `<div class="err" data-error=${field}>${messages.join(' · ')}</div>` : nothing}
567
649
  `;
568
650
  }
651
+ /** A number field. With a basis, a length is shown and taken as a percentage of it, and kept in the board unit at that basis. */
569
652
  _num(field, value, onChange, errors, extra = {}) {
570
653
  var _a, _b;
654
+ const basis = extra.basis;
571
655
  return html `<input
572
656
  type="number"
573
657
  data-field=${field}
574
658
  ?invalid=${errors.has(field)}
575
659
  min=${(_a = extra.min) !== null && _a !== void 0 ? _a : nothing}
576
660
  step=${(_b = extra.step) !== null && _b !== void 0 ? _b : nothing}
577
- .value=${shown(value)}
578
- @change=${(e) => onChange(num(e))}
661
+ .value=${live(shown(basis && typeof value === 'number' ? (value / basis) * 100 : value))}
662
+ @change=${(e) => onChange(basis ? (num(e) * basis) / 100 : num(e))}
579
663
  />`;
580
664
  }
581
665
  _seg(field, value, options, onChange, errors) {
@@ -585,36 +669,58 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
585
669
  </button>`)}
586
670
  </div>`;
587
671
  }
672
+ /** What the percentages of a tier with ratio dimensions are of: the face as it is now (the same ratio as at the face they were written at). */
673
+ _basisHint(at) {
674
+ var _a, _b;
675
+ const unit = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.unit) !== null && _b !== void 0 ? _b : 'mm';
676
+ const face = t('follows-face-basis', 'The face ({width} × {depth} {unit}) is 100 %.', { width: shown(at.width), depth: shown(at.depth), unit });
677
+ const height = at.height
678
+ ? t('follows-face-basis-height', 'Heights: the room over the face ({height} {unit}) is 100 %.', { height: shown(at.height), unit })
679
+ : t('follows-face-basis-no-height', 'Heights stay in {unit}.', { unit });
680
+ return html `<label class="l"></label><div class="hint" data-basis>${face} ${height}</div>`;
681
+ }
588
682
  _renderTier(draft, tierNo, errors) {
589
- var _a, _b, _c, _d, _e;
683
+ var _a, _b, _c, _d, _e, _f, _g, _h;
590
684
  const tier = draft.tiers.find(x => x.tierNo === tierNo);
591
685
  const anchors = (_a = this.options) === null || _a === void 0 ? void 0 : _a.anchors;
592
- const editTier = (patch) => this._edit(updateTier(draft, tierNo, patch));
686
+ /* A tier that follows its face, moved to another face, follows that one: its numbers are read as at the face it stands on. */
687
+ const editTier = (patch) => {
688
+ var _a;
689
+ const next = updateTier(draft, tierNo, patch);
690
+ this._edit(patch.anchorId && tier.followsFace ? setTierFollowsFace(next, tierNo, (_a = this._faceAt(patch.anchorId)) !== null && _a !== void 0 ? _a : tier.followsFace) : next);
691
+ };
593
692
  const position = (_b = tier.position) !== null && _b !== void 0 ? _b : { x: 0, y: 0, z: 0 };
594
693
  const fine = ['position-x', 'position-y', 'position-z', 'tier-rotation'].some(f => errors.has(f));
595
- const u = this._unit();
694
+ const b = this._basis(tier);
596
695
  return html `
597
696
  <section data-section="where">
598
697
  <h4>${t('where', 'Where')}</h4>
599
698
  ${this._row('anchor', t('face', 'Face'), (anchors === null || anchors === void 0 ? void 0 : anchors.length)
600
- ? html `<select data-field="anchor" ?invalid=${errors.has('anchor')} @change=${(e) => editTier({ anchorId: e.target.value })}>
601
- ${anchors.some(a => a.id === tier.anchorId) ? nothing : html `<option value=${(_c = tier.anchorId) !== null && _c !== void 0 ? _c : ''} selected>${(_d = tier.anchorId) !== null && _d !== void 0 ? _d : ''}</option>`}
699
+ ? html `<select data-field="anchor" ?invalid=${errors.has('anchor')} .value=${live((_c = tier.anchorId) !== null && _c !== void 0 ? _c : '')} @change=${(e) => editTier({ anchorId: e.target.value })}>
700
+ ${anchors.some(a => a.id === tier.anchorId) ? nothing : html `<option value=${(_d = tier.anchorId) !== null && _d !== void 0 ? _d : ''} selected>${(_e = tier.anchorId) !== null && _e !== void 0 ? _e : ''}</option>`}
602
701
  ${anchors.map(a => html `<option value=${a.id} ?selected=${a.id === tier.anchorId}>${this._anchorName(a.id)}</option>`)}
603
702
  </select>`
604
- : html `<input data-field="anchor" ?invalid=${errors.has('anchor')} .value=${(_e = tier.anchorId) !== null && _e !== void 0 ? _e : ''} @change=${(e) => editTier({ anchorId: e.target.value.trim() })} />`, errors)}
703
+ : html `<input data-field="anchor" ?invalid=${errors.has('anchor')} .value=${(_f = tier.anchorId) !== null && _f !== void 0 ? _f : ''} @change=${(e) => editTier({ anchorId: e.target.value.trim() })} />`, errors)}
605
704
  ${this._row('mount', t('mount', 'Mount'), this._seg('mount', tier.mount, [
606
705
  ['ON', t('mount.ON', 'On')],
607
706
  ['IN', t('mount.IN', 'In')],
608
707
  ['HANG', t('mount.HANG', 'Hang')]
609
708
  ], mount => editTier({ mount }), errors), errors)}
709
+ ${this._faceAt(tier.anchorId)
710
+ ? html `${this._row('follows-face', t('follows-face', 'Dimensions'), this._seg('follows-face', tier.followsFace ? 'FOLLOW' : 'KEEP', [
711
+ ['FOLLOW', t('follows-face.FOLLOW', 'Ratio (%)')],
712
+ ['KEEP', t('follows-face.KEEP', 'Fixed ({unit})', { unit: (_h = (_g = this.options) === null || _g === void 0 ? void 0 : _g.unit) !== null && _h !== void 0 ? _h : 'mm' })]
713
+ ], v => this._edit(setTierFollowsFace(draft, tierNo, v === 'FOLLOW' ? this._faceAt(tier.anchorId) : undefined)), errors), errors)}
714
+ ${tier.followsFace ? this._basisHint({ ...tier.followsFace, ...this._faceAt(tier.anchorId) }) : nothing}`
715
+ : nothing}
610
716
  </section>
611
717
  ${this._renderArrangement(draft, tierNo, errors)} ${this._renderSlot(draft, tierNo, errors)}
612
718
  <details data-section="fine" ?open=${fine}>
613
719
  <summary>${t('fine', 'Position and rotation')}</summary>
614
720
  <section>
615
- ${this._row('position-x', html `${t('position-x', 'Position X')}${u}`, this._num('position-x', position.x, n => editTier({ position: { ...position, x: n } }), errors), errors)}
616
- ${this._row('position-y', html `${t('position-y', 'Position Y (height)')}${u}`, this._num('position-y', position.y, n => editTier({ position: { ...position, y: n } }), errors), errors)}
617
- ${this._row('position-z', html `${t('position-z', 'Position Z')}${u}`, this._num('position-z', position.z, n => editTier({ position: { ...position, z: n } }), errors), errors)}
721
+ ${this._row('position-x', html `${t('position-x', 'Position X')}${this._unit(b.positionX)}`, this._num('position-x', position.x, n => editTier({ position: { ...position, x: n } }), errors, { basis: b.positionX }), errors)}
722
+ ${this._row('position-y', html `${t('position-y', 'Position Y (height)')}${this._unit(b.height)}`, this._num('position-y', position.y, n => editTier({ position: { ...position, y: n } }), errors, { basis: b.height }), errors)}
723
+ ${this._row('position-z', html `${t('position-z', 'Position Z')}${this._unit(b.positionZ)}`, this._num('position-z', position.z, n => editTier({ position: { ...position, z: n } }), errors, { basis: b.positionZ }), errors)}
618
724
  ${this._row('tier-rotation', t('tier-rotation', 'Tier rotation (deg)'), this._num('tier-rotation', tier.rotation, n => editTier({ rotation: n }), errors), errors)}
619
725
  </section>
620
726
  </details>
@@ -622,11 +728,12 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
622
728
  }
623
729
  /** 자리를 어떻게 늘어놓는가: 패턴, 수, 간격, 방향, 1번 자리. 그리고 [면에 맞춤] */
624
730
  _renderArrangement(draft, tierNo, errors) {
625
- var _a, _b, _c, _d, _e, _f, _g;
731
+ var _a, _b, _c, _d, _e, _f, _g, _h;
626
732
  const tier = draft.tiers.find(x => x.tierNo === tierNo);
627
733
  const l = tier.layout;
628
734
  const edit = (patch) => this._edit(updatePattern(draft, tierNo, patch));
629
- const u = this._unit();
735
+ const b = this._basis(tier);
736
+ const rowBasis = l.pattern === 'ROW' ? (l.axis === 'Z' ? b.z : b.x) : undefined;
630
737
  const side = (axis) => axis === 'X'
631
738
  ? [
632
739
  ['MIN', t('side.left', 'Left')],
@@ -659,7 +766,7 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
659
766
  ${l.pattern === 'ROW'
660
767
  ? html `
661
768
  ${this._row('count', t('count', 'Slots'), this._num('count', l.count, n => edit({ count: n }), errors, { min: '1', step: '1' }), errors)}
662
- ${this._row('pitch', html `${t('pitch', 'Pitch')}${u}`, html `<div class="inline">${this._num('pitch', l.pitch, n => edit({ pitch: n }), errors)} ${fitButton}</div>`, errors)}
769
+ ${this._row('pitch', html `${t('pitch', 'Pitch')}${this._unit(rowBasis)}`, html `<div class="inline">${this._num('pitch', l.pitch, n => edit({ pitch: n }), errors, { basis: rowBasis })} ${fitButton}</div>`, errors)}
663
770
  ${this._row('axis', t('axis', 'Direction'), this._seg('axis', l.axis, [
664
771
  ['X', t('axis.X', 'Across (X)')],
665
772
  ['Z', t('axis.Z', 'Down (Z)')]
@@ -671,13 +778,13 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
671
778
  ? html `
672
779
  ${this._row('rows', t('rows', 'Rows (Z)'), this._num('rows', l.rows, n => edit({ rows: n }), errors, { min: '1', step: '1' }), errors)}
673
780
  ${this._row('cols', t('cols', 'Columns (X)'), this._num('cols', l.cols, n => edit({ cols: n }), errors, { min: '1', step: '1' }), errors)}
674
- ${this._row('pitch-x', html `${t('pitch-x', 'Pitch X')}${u}`, this._num('pitch-x', (_b = l.pitch) === null || _b === void 0 ? void 0 : _b.x, n => edit({ pitch: { ...l.pitch, x: n } }), errors), errors)}
675
- ${this._row('pitch-z', html `${t('pitch-z', 'Pitch Z')}${u}`, html `<div class="inline">${this._num('pitch-z', (_c = l.pitch) === null || _c === void 0 ? void 0 : _c.z, n => edit({ pitch: { ...l.pitch, z: n } }), errors)} ${fitButton}</div>`, errors)}
676
- ${this._row('order', t('order', 'Numbering'), html `<select data-field="order" @change=${(e) => edit({ order: e.target.value })}>
781
+ ${this._row('pitch-x', html `${t('pitch-x', 'Pitch X')}${this._unit(b.x)}`, this._num('pitch-x', (_b = l.pitch) === null || _b === void 0 ? void 0 : _b.x, n => edit({ pitch: { ...l.pitch, x: n } }), errors, { basis: b.x }), errors)}
782
+ ${this._row('pitch-z', html `${t('pitch-z', 'Pitch Z')}${this._unit(b.z)}`, html `<div class="inline">${this._num('pitch-z', (_c = l.pitch) === null || _c === void 0 ? void 0 : _c.z, n => edit({ pitch: { ...l.pitch, z: n } }), errors, { basis: b.z })} ${fitButton}</div>`, errors)}
783
+ ${this._row('order', t('order', 'Numbering'), html `<select data-field="order" .value=${live((_d = l.order) !== null && _d !== void 0 ? _d : 'ROW_MAJOR')} @change=${(e) => edit({ order: e.target.value })}>
677
784
  ${['ROW_MAJOR', 'COL_MAJOR', 'SERPENTINE_ROW', 'SERPENTINE_COL'].map(o => { var _a; return html `<option value=${o} ?selected=${o === ((_a = l.order) !== null && _a !== void 0 ? _a : 'ROW_MAJOR')}>${t(`order.${o}`, o)}</option>`; })}
678
785
  </select>`, errors)}
679
- ${this._row('origin-x', t('origin-x', 'Slot 1 at X'), this._seg('origin-x', (_e = (_d = l.origin) === null || _d === void 0 ? void 0 : _d.x) !== null && _e !== void 0 ? _e : 'MIN', side('X'), x => edit({ origin: { z: 'MIN', ...l.origin, x } }), errors), errors)}
680
- ${this._row('origin-z', t('origin-z', 'Slot 1 at Z'), this._seg('origin-z', (_g = (_f = l.origin) === null || _f === void 0 ? void 0 : _f.z) !== null && _g !== void 0 ? _g : 'MIN', side('Z'), z => edit({ origin: { x: 'MIN', ...l.origin, z } }), errors), errors)}
786
+ ${this._row('origin-x', t('origin-x', 'Slot 1 at X'), this._seg('origin-x', (_f = (_e = l.origin) === null || _e === void 0 ? void 0 : _e.x) !== null && _f !== void 0 ? _f : 'MIN', side('X'), x => edit({ origin: { z: 'MIN', ...l.origin, x } }), errors), errors)}
787
+ ${this._row('origin-z', t('origin-z', 'Slot 1 at Z'), this._seg('origin-z', (_h = (_g = l.origin) === null || _g === void 0 ? void 0 : _g.z) !== null && _h !== void 0 ? _h : 'MIN', side('Z'), z => edit({ origin: { x: 'MIN', ...l.origin, z } }), errors), errors)}
681
788
  `
682
789
  : nothing}
683
790
  ${l.pattern === 'SINGLE' ? html `<label class="l"></label><div class="inline">${fitButton}</div>` : nothing}
@@ -739,22 +846,23 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
739
846
  }
740
847
  /** 자리 하나의 크기·받는 것·쌓기 (이 Tier 의 모든 자리 공통). CUSTOM 은 자리 표에서 */
741
848
  _renderSlot(draft, tierNo, errors) {
742
- var _a, _b, _c;
849
+ var _a, _b, _c, _d, _e;
743
850
  const tier = draft.tiers.find(x => x.tierNo === tierNo);
744
851
  if (tier.layout.pattern === 'CUSTOM')
745
852
  return nothing;
746
853
  const spec = tier.layout.slot;
747
854
  const edit = (patch) => this._edit(updateSlotSpec(draft, tierNo, patch));
748
- const u = this._unit();
749
- const allowed = (k, field, label) => { var _a; return this._row(field, html `${label}${u}`, this._num(field, (_a = spec.allowed) === null || _a === void 0 ? void 0 : _a[k], n => edit({ allowed: { ...spec.allowed, [k]: n } }), errors), errors); };
855
+ const b = this._basis(tier);
856
+ const bases = { width: (_a = b.slotWidth) === null || _a === void 0 ? void 0 : _a.call(b, spec.rotation), depth: (_b = b.slotDepth) === null || _b === void 0 ? void 0 : _b.call(b, spec.rotation), height: b.height };
857
+ const allowed = (k, field, label) => { var _a; return this._row(field, html `${label}${this._unit(bases[k])}`, this._num(field, (_a = spec.allowed) === null || _a === void 0 ? void 0 : _a[k], n => edit({ allowed: { ...spec.allowed, [k]: n } }), errors, { basis: bases[k] }), errors); };
750
858
  return html `
751
859
  <section data-section="slot">
752
860
  <h4>${t('slot-spec', 'Each slot')}</h4>
753
861
  ${this._acceptsEditor(spec, accepts => edit({ accepts }), errors)} ${allowed('width', 'allowed-width', t('allowed-width', 'Width (X)'))}
754
862
  ${allowed('depth', 'allowed-depth', t('allowed-depth', 'Depth (Z)'))} ${allowed('height', 'allowed-height', t('allowed-height', 'Height'))}
755
- ${((_a = this.options) === null || _a === void 0 ? void 0 : _a.itemTypes) ? html `<div class="hint">${t('drawn-at-slot', 'An item that gives no size is drawn at this size.')}</div>` : nothing}
756
- ${this._row('stack-limit', t('stack-limit', 'Stack limit'), this._num('stack-limit', (_b = spec.stackLimit) !== null && _b !== void 0 ? _b : 1, n => edit({ stackLimit: n }), errors, { min: '1', step: '1' }), errors)}
757
- ${this._row('rotation', t('rotation', 'Slot rotation (deg)'), this._num('rotation', (_c = spec.rotation) !== null && _c !== void 0 ? _c : 0, n => edit({ rotation: n || undefined }), errors), errors)}
863
+ ${((_c = this.options) === null || _c === void 0 ? void 0 : _c.itemTypes) ? html `<div class="hint">${t('drawn-at-slot', 'An item that gives no size is drawn at this size.')}</div>` : nothing}
864
+ ${this._row('stack-limit', t('stack-limit', 'Stack limit'), this._num('stack-limit', (_d = spec.stackLimit) !== null && _d !== void 0 ? _d : 1, n => edit({ stackLimit: n }), errors, { min: '1', step: '1' }), errors)}
865
+ ${this._row('rotation', t('rotation', 'Slot rotation (deg)'), this._num('rotation', (_e = spec.rotation) !== null && _e !== void 0 ? _e : 0, n => edit({ rotation: n || undefined }), errors), errors)}
758
866
  </section>
759
867
  `;
760
868
  }
@@ -762,32 +870,40 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
762
870
  var _a, _b, _c;
763
871
  const tier = draft.tiers.find(x => x.tierNo === tierNo);
764
872
  const slots = [...tier.layout.slots].sort((a, b) => a.slotNo - b.slotNo);
765
- const cell = (slotNo, value, patch) => html `<td><input type="number" .value=${shown(value)} @change=${(e) => this._edit(updateSlotSpec(draft, tierNo, patch(e), slotNo))} /></td>`;
873
+ const b = this._basis(tier);
874
+ /* A length cell: with a basis, a percentage of it (see _num). */
875
+ const cell = (slotNo, value, patch, basis) => html `<td>
876
+ <input
877
+ type="number"
878
+ .value=${live(shown(basis && typeof value === 'number' ? (value / basis) * 100 : value))}
879
+ @change=${(e) => this._edit(updateSlotSpec(draft, tierNo, patch(basis ? (num(e) * basis) / 100 : num(e)), slotNo))}
880
+ />
881
+ </td>`;
766
882
  return html `
767
883
  <h4>${t('custom-slots', 'Slots')}</h4>
768
884
  <table>
769
885
  <tr>
770
886
  <th>#</th>
771
- <th>X</th>
772
- <th>Z</th>
773
- <th>${t('w', 'W')}</th>
774
- <th>${t('d', 'D')}</th>
775
- <th>${t('h', 'H')}</th>
887
+ <th>X${this._unit(b.x)}</th>
888
+ <th>Z${this._unit(b.z)}</th>
889
+ <th>${t('w', 'W')}${this._unit(b.x)}</th>
890
+ <th>${t('d', 'D')}${this._unit(b.z)}</th>
891
+ <th>${t('h', 'H')}${this._unit(b.height)}</th>
776
892
  <th>${t('stack', 'Stack')}</th>
777
893
  <th>${t('rot', 'Rot')}</th>
778
894
  <th></th>
779
895
  </tr>
780
896
  ${slots.map(s => {
781
- var _a, _b, _c, _d, _e, _f, _g;
897
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
782
898
  return html `
783
899
  <tr>
784
900
  <td>${s.slotNo}</td>
785
- ${cell(s.slotNo, (_a = s.offset) === null || _a === void 0 ? void 0 : _a.x, e => ({ offset: { ...s.offset, x: num(e) } }))}
786
- ${cell(s.slotNo, (_b = s.offset) === null || _b === void 0 ? void 0 : _b.z, e => ({ offset: { ...s.offset, z: num(e) } }))}
787
- ${cell(s.slotNo, (_c = s.allowed) === null || _c === void 0 ? void 0 : _c.width, e => ({ allowed: { ...s.allowed, width: num(e) } }))}
788
- ${cell(s.slotNo, (_d = s.allowed) === null || _d === void 0 ? void 0 : _d.depth, e => ({ allowed: { ...s.allowed, depth: num(e) } }))}
789
- ${cell(s.slotNo, (_e = s.allowed) === null || _e === void 0 ? void 0 : _e.height, e => ({ allowed: { ...s.allowed, height: num(e) } }))}
790
- ${cell(s.slotNo, (_f = s.stackLimit) !== null && _f !== void 0 ? _f : 1, e => ({ stackLimit: num(e) }))} ${cell(s.slotNo, (_g = s.rotation) !== null && _g !== void 0 ? _g : 0, e => ({ rotation: num(e) || undefined }))}
901
+ ${cell(s.slotNo, (_a = s.offset) === null || _a === void 0 ? void 0 : _a.x, n => ({ offset: { ...s.offset, x: n } }), b.x)}
902
+ ${cell(s.slotNo, (_b = s.offset) === null || _b === void 0 ? void 0 : _b.z, n => ({ offset: { ...s.offset, z: n } }), b.z)}
903
+ ${cell(s.slotNo, (_c = s.allowed) === null || _c === void 0 ? void 0 : _c.width, n => ({ allowed: { ...s.allowed, width: n } }), (_d = b.slotWidth) === null || _d === void 0 ? void 0 : _d.call(b, s.rotation))}
904
+ ${cell(s.slotNo, (_e = s.allowed) === null || _e === void 0 ? void 0 : _e.depth, n => ({ allowed: { ...s.allowed, depth: n } }), (_f = b.slotDepth) === null || _f === void 0 ? void 0 : _f.call(b, s.rotation))}
905
+ ${cell(s.slotNo, (_g = s.allowed) === null || _g === void 0 ? void 0 : _g.height, n => ({ allowed: { ...s.allowed, height: n } }), b.height)}
906
+ ${cell(s.slotNo, (_h = s.stackLimit) !== null && _h !== void 0 ? _h : 1, n => ({ stackLimit: n }))} ${cell(s.slotNo, (_j = s.rotation) !== null && _j !== void 0 ? _j : 0, n => ({ rotation: n || undefined }))}
791
907
  <td><button ?disabled=${slots.length <= 1} @click=${() => this._edit(removeCustomSlot(draft, tierNo, s.slotNo))}>−</button></td>
792
908
  </tr>
793
909
  `;
@@ -1037,6 +1153,9 @@ __decorate([
1037
1153
  __decorate([
1038
1154
  property({ attribute: false })
1039
1155
  ], OxSlotLayoutEditor.prototype, "options", void 0);
1156
+ __decorate([
1157
+ property({ attribute: false })
1158
+ ], OxSlotLayoutEditor.prototype, "focusAnchors", void 0);
1040
1159
  __decorate([
1041
1160
  state()
1042
1161
  ], OxSlotLayoutEditor.prototype, "draft", void 0);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/slot-layout-editor",
3
3
  "description": "Editor for a holder's tiers and slots (things-scene slot layout): edit, validate, preview",
4
4
  "author": "heartyoh",
5
- "version": "10.29.86",
5
+ "version": "10.29.89",
6
6
  "type": "module",
7
7
  "main": "dist/src/index.js",
8
8
  "module": "dist/src/index.js",
@@ -46,15 +46,15 @@
46
46
  ],
47
47
  "dependencies": {
48
48
  "@operato/i18n": "^10.29.85",
49
- "@operato/property-editor": "^10.29.86",
49
+ "@operato/property-editor": "^10.29.87",
50
50
  "lit": "^3.1.2"
51
51
  },
52
52
  "peerDependencies": {
53
- "@hatiolab/things-scene": "^10.1.102"
53
+ "@hatiolab/things-scene": "^10.1.122"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@hatiolab/prettier-config": "^1.0.0",
57
- "@hatiolab/things-scene": "^10.1.102",
57
+ "@hatiolab/things-scene": "^10.1.122",
58
58
  "@open-wc/testing": "^4.0.0",
59
59
  "@web/dev-server": "^0.4.0",
60
60
  "@web/test-runner": "^0.19.0",
@@ -66,5 +66,5 @@
66
66
  "typescript": "^5.0.4"
67
67
  },
68
68
  "prettier": "@hatiolab/prettier-config",
69
- "gitHead": "82d02ea4ee30d49a87017e578b74ac960098ae7f"
69
+ "gitHead": "12514ae210898eba137a44f70208d73466168582"
70
70
  }
@@ -128,5 +128,12 @@
128
128
  "label.slot-layout.use-default": "Use default",
129
129
  "label.slot-layout.w": "W",
130
130
  "label.slot-layout.where": "Where",
131
- "label.slot-layout.width": "Width (X)"
131
+ "label.slot-layout.width": "Width (X)",
132
+ "label.slot-layout.follows-face": "Dimensions",
133
+ "label.slot-layout.follows-face.FOLLOW": "Ratio (%)",
134
+ "label.slot-layout.follows-face.KEEP": "Fixed ({unit})",
135
+ "label.slot-layout.issue.FOLLOWS_FACE_TURN": "A tier whose dimensions are a ratio (%) turns by 90° steps only",
136
+ "label.slot-layout.follows-face-basis": "The face ({width} × {depth} {unit}) is 100 %.",
137
+ "label.slot-layout.follows-face-basis-height": "Heights: the room over the face ({height} {unit}) is 100 %.",
138
+ "label.slot-layout.follows-face-basis-no-height": "Heights stay in {unit}."
132
139
  }
@@ -128,5 +128,12 @@
128
128
  "label.slot-layout.use-default": "Usar valor predeterminado",
129
129
  "label.slot-layout.w": "An",
130
130
  "label.slot-layout.where": "Dónde",
131
- "label.slot-layout.width": "Anchura (X)"
131
+ "label.slot-layout.width": "Anchura (X)",
132
+ "label.slot-layout.follows-face": "Dimensiones",
133
+ "label.slot-layout.follows-face.FOLLOW": "Proporción (%)",
134
+ "label.slot-layout.follows-face.KEEP": "Fijo ({unit})",
135
+ "label.slot-layout.issue.FOLLOWS_FACE_TURN": "Un nivel con dimensiones en proporción (%) solo gira en pasos de 90°",
136
+ "label.slot-layout.follows-face-basis": "La cara ({width} × {depth} {unit}) es el 100 %.",
137
+ "label.slot-layout.follows-face-basis-height": "Alturas: el espacio sobre la cara ({height} {unit}) es el 100 %.",
138
+ "label.slot-layout.follows-face-basis-no-height": "Las alturas siguen en {unit}."
132
139
  }
@@ -128,5 +128,12 @@
128
128
  "label.slot-layout.use-default": "Use default",
129
129
  "label.slot-layout.w": "W",
130
130
  "label.slot-layout.where": "置く場所",
131
- "label.slot-layout.width": "Width (X)"
131
+ "label.slot-layout.width": "Width (X)",
132
+ "label.slot-layout.follows-face": "寸法",
133
+ "label.slot-layout.follows-face.FOLLOW": "比率(%)",
134
+ "label.slot-layout.follows-face.KEEP": "固定({unit})",
135
+ "label.slot-layout.issue.FOLLOWS_FACE_TURN": "寸法が比率(%)の段は 90° 単位でのみ回転できます",
136
+ "label.slot-layout.follows-face-basis": "面({width} × {depth} {unit})を 100 % とします。",
137
+ "label.slot-layout.follows-face-basis-height": "高さは面の上の空間({height} {unit})を 100 % とします。",
138
+ "label.slot-layout.follows-face-basis-no-height": "高さは {unit} のままです。"
132
139
  }
@@ -128,5 +128,12 @@
128
128
  "label.slot-layout.use-default": "기본값 사용",
129
129
  "label.slot-layout.w": "폭",
130
130
  "label.slot-layout.where": "놓을 곳",
131
- "label.slot-layout.width": "폭 (X)"
131
+ "label.slot-layout.width": "폭 (X)",
132
+ "label.slot-layout.follows-face": "치수",
133
+ "label.slot-layout.follows-face.FOLLOW": "비율(%)",
134
+ "label.slot-layout.follows-face.KEEP": "고정({unit})",
135
+ "label.slot-layout.issue.FOLLOWS_FACE_TURN": "치수가 비율(%)인 층은 90° 단위로만 돌릴 수 있습니다",
136
+ "label.slot-layout.follows-face-basis": "면({width} × {depth} {unit})을 100 %로 봅니다.",
137
+ "label.slot-layout.follows-face-basis-height": "높이는 면 위 공간({height} {unit})을 100 %로 봅니다.",
138
+ "label.slot-layout.follows-face-basis-no-height": "높이는 {unit} 그대로입니다."
132
139
  }
@@ -128,5 +128,12 @@
128
128
  "label.slot-layout.use-default": "Use default",
129
129
  "label.slot-layout.w": "W",
130
130
  "label.slot-layout.where": "Di mana",
131
- "label.slot-layout.width": "Width (X)"
131
+ "label.slot-layout.width": "Width (X)",
132
+ "label.slot-layout.follows-face": "Dimensi",
133
+ "label.slot-layout.follows-face.FOLLOW": "Nisbah (%)",
134
+ "label.slot-layout.follows-face.KEEP": "Tetap ({unit})",
135
+ "label.slot-layout.issue.FOLLOWS_FACE_TURN": "Tingkat yang dimensinya nisbah (%) berpusing dalam langkah 90° sahaja",
136
+ "label.slot-layout.follows-face-basis": "Muka ({width} × {depth} {unit}) ialah 100 %.",
137
+ "label.slot-layout.follows-face-basis-height": "Ketinggian: ruang di atas muka ({height} {unit}) ialah 100 %.",
138
+ "label.slot-layout.follows-face-basis-no-height": "Ketinggian kekal dalam {unit}."
132
139
  }
@@ -128,5 +128,12 @@
128
128
  "label.slot-layout.use-default": "Use default",
129
129
  "label.slot-layout.w": "W",
130
130
  "label.slot-layout.where": "放置处",
131
- "label.slot-layout.width": "Width (X)"
131
+ "label.slot-layout.width": "Width (X)",
132
+ "label.slot-layout.follows-face": "尺寸",
133
+ "label.slot-layout.follows-face.FOLLOW": "比例(%)",
134
+ "label.slot-layout.follows-face.KEEP": "固定({unit})",
135
+ "label.slot-layout.issue.FOLLOWS_FACE_TURN": "尺寸为比例(%)的层只能以 90° 为单位旋转",
136
+ "label.slot-layout.follows-face-basis": "以面({width} × {depth} {unit})为 100 %。",
137
+ "label.slot-layout.follows-face-basis-height": "高度以面上空间({height} {unit})为 100 %。",
138
+ "label.slot-layout.follows-face-basis-no-height": "高度仍以 {unit} 计。"
132
139
  }