@things-factory/figure-ui 10.1.196 → 10.1.198

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.
@@ -320,12 +320,16 @@ export class FigureEditor extends LitElement {
320
320
  }
321
321
  /** The scene toggles: the mode already shown takes the gizmo away. */
322
322
  private useGizmo(mode: 'translate' | 'rotate' | 'scale') {
323
- if (mode === 'scale' && this.selected && this.gizmoMode !== 'scale') {
323
+ /*
324
+ R does what the bar's resize tool does: on a part whose size is not its own to drag the tool is off, so no gizmo is
325
+ put on it to drag in vain (:3300, 10.1.196) -- the tool's own words are said instead, and a part turned is sent to
326
+ its size fields.
327
+ */
328
+ if (mode === 'scale' && this.selected && this.gizmoMode !== 'scale' && !this.reachOf(this.selected).scale) {
324
329
  const asset = this.asset()
325
- if (asset && this.sizeDragTurned(asset, this.selected)) {
326
- this.tellSizeByFields(this.selected)
327
- return
328
- }
330
+ if (asset && this.sizeDragTurned(asset, this.selected)) this.tellSizeByFields(this.selected)
331
+ else this.refusals.say(i18next.t('figure.text.gizmo-not-own'))
332
+ return
329
333
  }
330
334
  this.renderRoot.querySelector<FigureCanvas>('figure-canvas')?.gizmo(mode)
331
335
  this.gizmoMode = this.gizmoMode === mode ? undefined : mode
@@ -47,6 +47,11 @@ export class RefusalTeller {
47
47
  this.toldViewError = viewError
48
48
  }
49
49
 
50
+ /** What cannot be done, said once as a notice: nothing went wrong, and there is no other way to offer. */
51
+ say(message: string) {
52
+ notify({ level: 'info', message })
53
+ }
54
+
50
55
  /**
51
56
  * What cannot be done this way, with the way it can, as a notice: nothing went wrong, so not the error's red
52
57
  * (user 2026-10-19, the size drag on a part attached turned). Given more time than a plain notice, for its button.
@@ -294,12 +294,18 @@ let FigureEditor = class FigureEditor extends LitElement {
294
294
  }
295
295
  /** The scene toggles: the mode already shown takes the gizmo away. */
296
296
  useGizmo(mode) {
297
- if (mode === 'scale' && this.selected && this.gizmoMode !== 'scale') {
297
+ /*
298
+ R does what the bar's resize tool does: on a part whose size is not its own to drag the tool is off, so no gizmo is
299
+ put on it to drag in vain (:3300, 10.1.196) -- the tool's own words are said instead, and a part turned is sent to
300
+ its size fields.
301
+ */
302
+ if (mode === 'scale' && this.selected && this.gizmoMode !== 'scale' && !this.reachOf(this.selected).scale) {
298
303
  const asset = this.asset();
299
- if (asset && this.sizeDragTurned(asset, this.selected)) {
304
+ if (asset && this.sizeDragTurned(asset, this.selected))
300
305
  this.tellSizeByFields(this.selected);
301
- return;
302
- }
306
+ else
307
+ this.refusals.say(i18next.t('figure.text.gizmo-not-own'));
308
+ return;
303
309
  }
304
310
  this.renderRoot.querySelector('figure-canvas')?.gizmo(mode);
305
311
  this.gizmoMode = this.gizmoMode === mode ? undefined : mode;