@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/image",
3
- "version": "1.0.0-beta.7",
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.7"
26
+ "@leafer/interface": "1.0.0-beta.9"
23
27
  }
24
28
  }
@@ -35,7 +35,7 @@ export class ImageManager implements IImageManager {
35
35
  if (!this.tasker.running) this.tasker.start()
36
36
  }
37
37
 
38
- public destory(): void {
38
+ public destroy(): void {
39
39
  this.leafer = null
40
40
  this.map = null
41
41
  }
@@ -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 destory(): void {
44
+ public destroy(): void {
43
45
  this.view = null
44
46
  this.options = null
45
47
  }