@leafer/event 1.0.0-alpha.23 → 1.0.0-alpha.30

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/event",
3
- "version": "1.0.0-alpha.23",
3
+ "version": "1.0.0-alpha.30",
4
4
  "description": "@leafer/event",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -19,9 +19,9 @@
19
19
  "leaferjs"
20
20
  ],
21
21
  "dependencies": {
22
- "@leafer/decorator": "1.0.0-alpha.23"
22
+ "@leafer/decorator": "1.0.0-alpha.30"
23
23
  },
24
24
  "devDependencies": {
25
- "@leafer/interface": "1.0.0-alpha.23"
25
+ "@leafer/interface": "1.0.0-alpha.30"
26
26
  }
27
27
  }
package/src/ImageEvent.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { IImageEvent, IObject, IEventTarget, ILeaferImage } from '@leafer/interface'
2
- import { Event } from '@leafer/event'
2
+
3
+ import { Event } from './Event'
3
4
 
4
5
  export class ImageEvent extends Event implements IImageEvent {
5
6
 
@@ -5,6 +5,8 @@ import { Event } from './Event'
5
5
 
6
6
  export class LayoutEvent extends Event implements ILayoutEvent {
7
7
 
8
+ static CHECK_UPDATE = 'layout.check_update'
9
+
8
10
  static REQUEST = 'layout.request'
9
11
 
10
12
  static START = 'layout.start'
@@ -18,10 +20,15 @@ export class LayoutEvent extends Event implements ILayoutEvent {
18
20
  static END = 'layout.end'
19
21
 
20
22
  readonly data: ILayoutBlockData[]
23
+ readonly times: number
21
24
 
22
- constructor(type: string, data?: ILayoutBlockData[]) {
25
+ constructor(type: string, data?: ILayoutBlockData[], times?: number) {
23
26
  super(type)
24
- if (data) this.data = data
27
+ if (data) {
28
+ this.data = data
29
+ this.times = times
30
+ }
31
+
25
32
  }
26
33
 
27
34
  }
@@ -1,4 +1,4 @@
1
- import { IRenderEvent } from '@leafer/interface'
1
+ import { IBounds, IRenderEvent, IRenderOptions } from '@leafer/interface'
2
2
 
3
3
  import { Event } from './Event'
4
4
 
@@ -17,4 +17,17 @@ export class RenderEvent extends Event implements IRenderEvent {
17
17
 
18
18
  static END = 'render.end'
19
19
 
20
+ readonly renderBounds: IBounds
21
+ readonly renderOptions: IRenderOptions
22
+ readonly times: number
23
+
24
+ constructor(type: string, times?: number, bounds?: IBounds, options?: IRenderOptions) {
25
+ super(type)
26
+ if (times) this.times = times
27
+ if (bounds) {
28
+ this.renderBounds = bounds
29
+ this.renderOptions = options
30
+ }
31
+ }
32
+
20
33
  }