@hatiolab/things-scene 3.2.15 → 3.2.17

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/things-scene.d.ts CHANGED
@@ -28,12 +28,13 @@ declare module '@hatiolab/things-scene' {
28
28
  }
29
29
 
30
30
  type FITMODE = 'both' | 'ratio' | 'width' | 'height' | 'center' | 'none'
31
- type DIMENSION = { x: number; y: number }
32
- type SCALE = DIMENSION
33
- type TRANSLATE = DIMENSION
34
- type POSITION = DIMENSION
35
- type POINT = DIMENSION
36
- type LOCATION = DIMENSION
31
+ type POINT = { x: number; y: number; z?: number }
32
+ type SCALE = POINT
33
+ type TRANSLATE = POINT
34
+ type POSITION = POINT
35
+ type LOCATION = POINT
36
+ type ROTATION = POINT
37
+ type DIMENSION = { width: number; height: number; depth: number }
37
38
  type BOUNDS = { left: number; top: number; width: number; height: number }
38
39
  type DELTA = {
39
40
  tx?: number
@@ -128,7 +129,7 @@ declare module '@hatiolab/things-scene' {
128
129
  ondragend?(point: POSITION, index: number, component: Component): void
129
130
  }
130
131
 
131
- interface Control extends DIMENSION {
132
+ interface Control extends POINT {
132
133
  handler: ControlHandler
133
134
  }
134
135
 
@@ -333,12 +334,21 @@ declare module '@hatiolab/things-scene' {
333
334
  get textBounds(): BOUNDS
334
335
  get textRotation(): number
335
336
 
336
- get path(): Array<DIMENSION>
337
- set path(path: Array<DIMENSION>)
337
+ get path(): Array<POINT>
338
+ set path(path: Array<POINT>)
338
339
 
339
340
  get center(): POINT
340
341
  set center(point: POINT)
341
342
 
343
+ get location(): POINT
344
+ set location(location: POINT)
345
+
346
+ get rotate(): ROTATION
347
+ set rotate(rotation: ROTATION)
348
+
349
+ get dimension(): DIMENSION
350
+ set dimension(dimension: DIMENSION)
351
+
342
352
  get anchors(): Array<Anchor>
343
353
  get controls(): Array<Control> | undefined
344
354
  get hasTextProperty(): boolean
@@ -366,8 +376,8 @@ declare module '@hatiolab/things-scene' {
366
376
 
367
377
  prepareIf(condition: boolean): void
368
378
  mutatePath(
369
- beforeLogic: ((path: Array<DIMENSION>) => void) | null,
370
- afterLogic: ((path: Array<DIMENSION>) => void) | null,
379
+ beforeLogic: ((path: Array<POINT>) => void) | null,
380
+ afterLogic: ((path: Array<POINT>) => void) | null,
371
381
  context?: any
372
382
  ): void
373
383