customized-fabric 1.4.2 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -39,6 +39,6 @@ export default class ImagePlaceholder extends fabric.Group {
39
39
  loadCustomizedImage?: (image: IImageOptions) => Promise<void>;
40
40
  setImageType?: (type: ImageFilterType) => void;
41
41
  setImageColor?: (color: string) => void;
42
- applyImageFilters?: (image: fabric.Image) => void;
42
+ applyImageFilters?: (image: fabric.Image | undefined) => void;
43
43
  constructor(options?: IImagePlaceholderOptions);
44
44
  }
@@ -50,7 +50,10 @@ const ImagePlaceholderClass = fabric_1.fabric.util.createClass(fabric_1.fabric.G
50
50
  }
51
51
  }
52
52
  if (options?.imageType) {
53
- this.setImageType(options?.imageType, { color: options?.imageColor });
53
+ this.setImageType(options?.imageType);
54
+ }
55
+ if (options?.imageColor) {
56
+ this.setImageColor(options?.imageColor);
54
57
  }
55
58
  },
56
59
  loadImage: async function (image) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customized-fabric",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",