@leafer/image 1.0.0-beta.7 → 1.0.0-beta.9
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 +6 -2
- package/src/ImageManager.ts +1 -1
- package/src/LeaferImageBase.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/image",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.9",
|
|
4
4
|
"description": "@leafer/image",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,7 +18,11 @@
|
|
|
18
18
|
"leafer",
|
|
19
19
|
"leaferjs"
|
|
20
20
|
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@leafer/task": "1.0.0-beta.9",
|
|
23
|
+
"@leafer/platform": "1.0.0-beta.9"
|
|
24
|
+
},
|
|
21
25
|
"devDependencies": {
|
|
22
|
-
"@leafer/interface": "1.0.0-beta.
|
|
26
|
+
"@leafer/interface": "1.0.0-beta.9"
|
|
23
27
|
}
|
|
24
28
|
}
|
package/src/ImageManager.ts
CHANGED
package/src/LeaferImageBase.ts
CHANGED
|
@@ -10,6 +10,7 @@ export class LeaferImageBase implements ILeaferImage {
|
|
|
10
10
|
public height: number
|
|
11
11
|
|
|
12
12
|
public ready: boolean
|
|
13
|
+
public error: IObject
|
|
13
14
|
|
|
14
15
|
public options: ILeaferImageConfig
|
|
15
16
|
|
|
@@ -25,6 +26,7 @@ export class LeaferImageBase implements ILeaferImage {
|
|
|
25
26
|
this.view = img
|
|
26
27
|
if (onSuccess) onSuccess(this)
|
|
27
28
|
}).catch((e) => {
|
|
29
|
+
this.error = e
|
|
28
30
|
if (onError) onError(e)
|
|
29
31
|
})
|
|
30
32
|
}
|
|
@@ -39,7 +41,7 @@ export class LeaferImageBase implements ILeaferImage {
|
|
|
39
41
|
return canvas
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
public
|
|
44
|
+
public destroy(): void {
|
|
43
45
|
this.view = null
|
|
44
46
|
this.options = null
|
|
45
47
|
}
|