@leafer/image 1.6.2 → 1.6.4

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.6.2",
3
+ "version": "1.6.4",
4
4
  "description": "@leafer/image",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,11 +22,11 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/task": "1.6.2",
26
- "@leafer/file": "1.6.2",
27
- "@leafer/platform": "1.6.2"
25
+ "@leafer/task": "1.6.4",
26
+ "@leafer/file": "1.6.4",
27
+ "@leafer/platform": "1.6.4"
28
28
  },
29
29
  "devDependencies": {
30
- "@leafer/interface": "1.6.2"
30
+ "@leafer/interface": "1.6.4"
31
31
  }
32
32
  }
@@ -32,8 +32,8 @@ export const ImageManager: IImageManager = {
32
32
  }
33
33
  },
34
34
 
35
- hasOpacityPixel(config: ILeaferImageConfig): boolean {
36
- return FileHelper.opacityTypes.some(item => I.isFormat(item, config))
35
+ hasAlphaPixel(config: ILeaferImageConfig): boolean {
36
+ return FileHelper.alphaPixelTypes.some(item => I.isFormat(item, config))
37
37
  },
38
38
 
39
39
  isFormat(format: IExportFileType, config: ILeaferImageConfig): boolean {
@@ -19,7 +19,7 @@ export class LeaferImage implements ILeaferImage {
19
19
  public height: number
20
20
 
21
21
  public isSVG: boolean
22
- public hasOpacityPixel: boolean // check png / svg / webp
22
+ public hasAlphaPixel: boolean // check png / svg / webp
23
23
 
24
24
  public get completed() { return this.ready || !!this.error }
25
25
 
@@ -46,7 +46,7 @@ export class LeaferImage implements ILeaferImage {
46
46
  }
47
47
 
48
48
  ImageManager.isFormat('svg', config) && (this.isSVG = true)
49
- ImageManager.hasOpacityPixel(config) && (this.hasOpacityPixel = true)
49
+ ImageManager.hasAlphaPixel(config) && (this.hasAlphaPixel = true)
50
50
  }
51
51
 
52
52
  public load(onSuccess?: IFunction, onError?: IFunction): number {
package/types/index.d.ts CHANGED
@@ -7,7 +7,7 @@ declare class LeaferImage implements ILeaferImage {
7
7
  width: number;
8
8
  height: number;
9
9
  isSVG: boolean;
10
- hasOpacityPixel: boolean;
10
+ hasAlphaPixel: boolean;
11
11
  get completed(): boolean;
12
12
  ready: boolean;
13
13
  error: IObject;