@hatiolab/things-scene 2.7.24 → 3.0.0-beta.2
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-ie.js +1 -1
- package/things-scene-min.js +1 -1
- package/things-scene.d.ts +17 -2
- package/things-scene.mjs +1 -1
package/things-scene.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ declare module '@hatiolab/things-scene' {
|
|
|
17
17
|
type SCALE = DIMENSION
|
|
18
18
|
type TRANSLATE = DIMENSION
|
|
19
19
|
type POSITION = DIMENSION
|
|
20
|
+
type POINT = DIMENSION
|
|
20
21
|
|
|
21
22
|
type LAYOUT = {
|
|
22
23
|
reflow: (container: Container) => void
|
|
@@ -172,9 +173,13 @@ declare module '@hatiolab/things-scene' {
|
|
|
172
173
|
hierarchy: Model
|
|
173
174
|
path: Array<DIMENSION>
|
|
174
175
|
anchors: Array<Anchor>
|
|
176
|
+
|
|
175
177
|
get data(): any
|
|
176
178
|
set data(data: any)
|
|
177
179
|
|
|
180
|
+
get center(): POINT
|
|
181
|
+
set center(point: POINT)
|
|
182
|
+
|
|
178
183
|
get controls(): Array<Control> | undefined
|
|
179
184
|
get hasTextProperty(): boolean
|
|
180
185
|
|
|
@@ -183,10 +188,17 @@ declare module '@hatiolab/things-scene' {
|
|
|
183
188
|
getState(prop: string): any
|
|
184
189
|
setState(props: Properties | any, value?: any): void
|
|
185
190
|
get(prop: string): any
|
|
191
|
+
contains(x: number, y: number): boolean
|
|
186
192
|
set(props: Properties | string, value?: any): void
|
|
187
193
|
reposition(): void
|
|
194
|
+
|
|
188
195
|
transcoordP2S(x: number, y: number): POSITION
|
|
196
|
+
transcoordC2S(x: number, y: number, top?: RootContainer): POSITION
|
|
197
|
+
|
|
198
|
+
prerender(context: CanvasRenderingContext2D): void
|
|
189
199
|
render(context: CanvasRenderingContext2D): void
|
|
200
|
+
postrender(context: CanvasRenderingContext2D): void
|
|
201
|
+
|
|
190
202
|
executeMappings(force?: boolean): void
|
|
191
203
|
invalidate(): void
|
|
192
204
|
animate(config: AnimationConfig): {
|
|
@@ -211,9 +223,11 @@ declare module '@hatiolab/things-scene' {
|
|
|
211
223
|
ondblclick(e: MouseEvent): void
|
|
212
224
|
}
|
|
213
225
|
|
|
214
|
-
class ContainerAbstract extends MoveHandle(RectPath(Component)) {
|
|
215
|
-
class Container extends MixinHTMLElement(ContainerAbstract) {
|
|
226
|
+
class ContainerAbstract extends MoveHandle(RectPath(Component)) {
|
|
216
227
|
indexOf(component: Component): number
|
|
228
|
+
size(): number
|
|
229
|
+
addComponent(target: Component): void
|
|
230
|
+
removeComponent(target: Component): void
|
|
217
231
|
insertComponentAt(target: Component, idx: number): void
|
|
218
232
|
findById(id: string): Component
|
|
219
233
|
|
|
@@ -222,6 +236,7 @@ declare module '@hatiolab/things-scene' {
|
|
|
222
236
|
|
|
223
237
|
components: Component[]
|
|
224
238
|
}
|
|
239
|
+
class Container extends MixinHTMLElement(ContainerAbstract) {}
|
|
225
240
|
class RootContainer extends Container {}
|
|
226
241
|
|
|
227
242
|
class Layer extends ContainerAbstract {
|