@hatiolab/things-scene 3.1.1 → 3.1.3

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
@@ -6,6 +6,7 @@ declare module '@hatiolab/things-scene' {
6
6
  type Properties = { [key: string]: any }
7
7
  type State = Properties
8
8
  type Style = Properties
9
+ type Decorator = (component: Component, context: CanvasRenderingContext2D) => boolean
9
10
 
10
11
  type ChangeFunction = (selector: string, value: any, self: any) => Component[]
11
12
 
@@ -276,6 +277,7 @@ declare module '@hatiolab/things-scene' {
276
277
  customObjToVal?: (obj: any) => any
277
278
  ): () => string | undefined
278
279
  static reposition(component: Component): void
280
+ static registerDecorator(name: string, decorator: Decorator): void
279
281
 
280
282
  state: Properties
281
283
  bounds: BOUNDS
@@ -303,6 +305,7 @@ declare module '@hatiolab/things-scene' {
303
305
  set text(text: string)
304
306
 
305
307
  get textBounds(): BOUNDS
308
+ get textRotation(): number
306
309
 
307
310
  get center(): POINT
308
311
  set center(point: POINT)
@@ -312,6 +315,8 @@ declare module '@hatiolab/things-scene' {
312
315
  get hasTextProperty(): boolean
313
316
  get textSubstitutor(): () => string
314
317
 
318
+ get decorators(): Array<string | Decorator>
319
+
315
320
  isRootModel(): boolean
316
321
  isContainer(): boolean
317
322
  isLine(): boolean