@leafer/event 1.0.0-alpha.23 → 1.0.0-alpha.31
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 +3 -3
- package/src/ImageEvent.ts +2 -1
- package/src/LayoutEvent.ts +9 -2
- package/src/RenderEvent.ts +14 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/event",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.31",
|
|
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.
|
|
22
|
+
"@leafer/decorator": "1.0.0-alpha.31"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@leafer/interface": "1.0.0-alpha.
|
|
25
|
+
"@leafer/interface": "1.0.0-alpha.31"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/ImageEvent.ts
CHANGED
package/src/LayoutEvent.ts
CHANGED
|
@@ -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)
|
|
27
|
+
if (data) {
|
|
28
|
+
this.data = data
|
|
29
|
+
this.times = times
|
|
30
|
+
}
|
|
31
|
+
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
}
|
package/src/RenderEvent.ts
CHANGED
|
@@ -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
|
}
|