@hatiolab/things-scene 3.3.7 → 3.3.9

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
@@ -4,7 +4,7 @@ declare module '@hatiolab/things-scene' {
4
4
  type Properties = { [key: string]: any }
5
5
  type State = Properties
6
6
  type Style = Properties
7
- type Decorator = (component: Component, context: CanvasRenderingContext2D) => boolean
7
+ type Decorator = (component: Component, context: CanvasRenderingContext2D, delta?: number) => boolean
8
8
  type PopupOptions = {
9
9
  data: any
10
10
  location: 'center' | 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom'
@@ -402,6 +402,7 @@ declare module '@hatiolab/things-scene' {
402
402
  transcoordP2S(x: number, y: number): POSITION
403
403
  transcoordC2S(x: number, y: number, top?: RootContainer): POSITION
404
404
  transcoordS2T(x: number, y: number): POSITION
405
+ transcoordS2C(x: number, y: number, top?: RootContainer): POSITION
405
406
 
406
407
  prerender(context: CanvasRenderingContext2D): void
407
408
  render(context: CanvasRenderingContext2D): void
@@ -468,6 +469,7 @@ declare module '@hatiolab/things-scene' {
468
469
  canvas: HTMLCanvasElement | null
469
470
 
470
471
  getContext(): CanvasRenderingContext2D
472
+ centerTo(component: Component, animated?: boolean): void
471
473
  }
472
474
 
473
475
  class ModelLayer extends Layer {
@@ -658,7 +660,7 @@ declare module '@hatiolab/things-scene' {
658
660
  redo(): void
659
661
  undo(): void
660
662
  move(component: Component, to_container: Container, to_index: number): void
661
- centerTo(component: Component): void
663
+ centerTo(component: Component, animated?: boolean): void
662
664
 
663
665
  select(selector: string | Function, ...others: (string | Function)[]): Component[]
664
666
  paste(clipboard: string): void