@hatiolab/things-scene 3.2.15 → 3.2.16
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/package.json +1 -1
- package/things-scene.d.ts +21 -11
- package/things-scene.mjs +1 -1
package/package.json
CHANGED
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
|
|
32
|
-
type SCALE =
|
|
33
|
-
type TRANSLATE =
|
|
34
|
-
type POSITION =
|
|
35
|
-
type
|
|
36
|
-
type
|
|
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
|
|
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<
|
|
337
|
-
set path(path: Array<
|
|
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<
|
|
370
|
-
afterLogic: ((path: Array<
|
|
379
|
+
beforeLogic: ((path: Array<POINT>) => void) | null,
|
|
380
|
+
afterLogic: ((path: Array<POINT>) => void) | null,
|
|
371
381
|
context?: any
|
|
372
382
|
): void
|
|
373
383
|
|