@hatiolab/things-scene 3.2.5 → 3.2.7

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
@@ -1,5 +1,3 @@
1
- import { property } from 'lodash'
2
-
3
1
  declare module '@hatiolab/things-scene' {
4
2
  type Constructor<T = {}> = new (...args: any[]) => T
5
3
  type Class = { new (...args: any[]): any }
@@ -118,12 +116,6 @@ declare module '@hatiolab/things-scene' {
118
116
  ondragend?(point: POSITION, index: number, component: Component): void
119
117
  }
120
118
 
121
- class ScenePopup {
122
- static hideAll(root: Component): void
123
- static hide(component: Component): void
124
- static show(component: Component, ref: string, options: PopupOptions): void
125
- }
126
-
127
119
  interface Control extends DIMENSION {
128
120
  handler: ControlHandler
129
121
  }
@@ -173,6 +165,11 @@ declare module '@hatiolab/things-scene' {
173
165
  class ScriptLoader {
174
166
  static load(scripts: string | Array<string>, styles?: string | Array<string>): Promise<void>
175
167
  }
168
+ class ScenePopup {
169
+ static hideAll(root: Component): void
170
+ static hide(component: Component): void
171
+ static show(component: Component, ref: string, options: PopupOptions): void
172
+ }
176
173
 
177
174
  type Anchor = {
178
175
  name: string
@@ -302,7 +299,6 @@ declare module '@hatiolab/things-scene' {
302
299
  rootModel: ModelLayer
303
300
  parent: Container
304
301
  app: ApplicationContext
305
- path: Array<DIMENSION>
306
302
  hidden: boolean
307
303
 
308
304
  get nature(): ComponentNature
@@ -324,6 +320,9 @@ declare module '@hatiolab/things-scene' {
324
320
  get textBounds(): BOUNDS
325
321
  get textRotation(): number
326
322
 
323
+ get path(): Array<DIMENSION>
324
+ set path(path: Array<DIMENSION>)
325
+
327
326
  get center(): POINT
328
327
  set center(point: POINT)
329
328
 
@@ -352,8 +351,17 @@ declare module '@hatiolab/things-scene' {
352
351
  reposition(): void
353
352
  clearCache(): void
354
353
 
354
+ prepareIf(boolean)
355
+ createCanvas(width: number, height: number)
356
+ mutatePath(
357
+ beforeLogic?: (context: CanvasRenderingContext2D | null, path: Array<DIMENSION>) => void,
358
+ afterLogic?: (context: CanvasRenderingContext2D | null, path: Array<DIMENSION>) => void,
359
+ context?: CanvasRenderingContext2D
360
+ )
361
+
355
362
  transcoordP2S(x: number, y: number): POSITION
356
363
  transcoordC2S(x: number, y: number, top?: RootContainer): POSITION
364
+ transcoordS2T(x: number, y: number): POSITION
357
365
 
358
366
  prerender(context: CanvasRenderingContext2D): void
359
367
  render(context: CanvasRenderingContext2D): void