customized-fabric 1.7.2 → 1.7.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -17,6 +17,7 @@ export declare const toImagePlaceholderObject: (object: ImagePlaceholder) => {
|
|
17
17
|
color: string | undefined;
|
18
18
|
removeBackground: boolean | undefined;
|
19
19
|
faceCutout: boolean | undefined;
|
20
|
+
advancedFilter: string | undefined;
|
20
21
|
};
|
21
22
|
};
|
22
23
|
export default class ImagePlaceholder extends fabric.Group {
|
@@ -35,6 +36,7 @@ export default class ImagePlaceholder extends fabric.Group {
|
|
35
36
|
uploadedImage?: fabric.Image;
|
36
37
|
layoutGroupId?: string;
|
37
38
|
layoutGroupName?: string;
|
39
|
+
advancedFilter?: string;
|
38
40
|
getSettings?: (attribute: string) => any;
|
39
41
|
setSizes?: (options: {
|
40
42
|
width?: number;
|
@@ -50,14 +50,14 @@ const ImagePlaceholderClass = fabric_1.fabric.util.createClass(fabric_1.fabric.G
|
|
50
50
|
}
|
51
51
|
}
|
52
52
|
if (options?.imageSettings) {
|
53
|
-
const { type, color, removeBackground, faceCutout } = options?.imageSettings;
|
53
|
+
const { type, color, removeBackground, faceCutout, advancedFilter } = options?.imageSettings;
|
54
54
|
if (type) {
|
55
55
|
this.setImageType(type);
|
56
56
|
}
|
57
57
|
if (color) {
|
58
58
|
this.setImageColor(color);
|
59
59
|
}
|
60
|
-
this.set({ removeBackground, faceCutout });
|
60
|
+
this.set({ removeBackground, faceCutout, advancedFilter });
|
61
61
|
}
|
62
62
|
},
|
63
63
|
loadImage: async function (image) {
|
@@ -305,6 +305,7 @@ const toImagePlaceholderObject = (object) => {
|
|
305
305
|
color: object?.imageColor,
|
306
306
|
removeBackground: object?.removeBackground,
|
307
307
|
faceCutout: object?.faceCutout,
|
308
|
+
advancedFilter: object?.advancedFilter,
|
308
309
|
},
|
309
310
|
};
|
310
311
|
};
|
@@ -57,6 +57,7 @@ export interface IImagePlaceholderOptions extends fabric.IGroupOptions {
|
|
57
57
|
color?: string;
|
58
58
|
removeBackground?: boolean;
|
59
59
|
faceCutout?: boolean;
|
60
|
+
advancedFilter?: string;
|
60
61
|
};
|
61
62
|
}
|
62
63
|
export declare type ImageFilterType = "Full color" | "Grayscale" | "Blend color";
|