@hatiolab/things-scene 2.7.17 → 2.7.21

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,10 +1,13 @@
1
1
  declare module '@hatiolab/things-scene' {
2
2
  type Constructor<T = {}> = new (...args: any[]) => T
3
3
 
4
+ const MODE_VIEW = 0
5
+ const MODE_EDIT = 1
6
+ const MODE_SHIFT = 2
7
+
4
8
  enum SCENE_MODE {
5
- MODE_VIEW = 0,
6
- MODE_EDIT = 1,
7
- MODE_SHIFT = 2
9
+ VIEW = 0,
10
+ EDIT = 1
8
11
  }
9
12
 
10
13
  type FITMODE = 'both' | 'ratio' | 'width' | 'height' | 'center' | 'none'
@@ -157,6 +160,7 @@ declare module '@hatiolab/things-scene' {
157
160
  transcoordP2S(x: number, y: number): POSITION
158
161
  render(context: CanvasRenderingContext2D): void
159
162
  executeMappings(force?: boolean): void
163
+ invalidate(): void
160
164
 
161
165
  onchange(after: Properties, before: Properties): void
162
166
 
@@ -188,13 +192,13 @@ declare module '@hatiolab/things-scene' {
188
192
  canvas: HTMLCanvasElement
189
193
 
190
194
  getContext(): CanvasRenderingContext2D
191
- invalidate(): void
192
195
  }
193
196
 
194
197
  class ModelLayer extends Layer {
195
198
  overlay: HTMLDivElement
196
199
  }
197
200
 
201
+ class Text extends RectPath(Component) {}
198
202
  class Shape extends Component {}
199
203
  class Ellipse extends Shape {}
200
204
  class Rect extends RectPath(Shape) {}