customized-fabric 1.7.2 → 1.7.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.
@@ -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) {
|
@@ -125,6 +125,7 @@ const ImagePlaceholderClass = fabric_1.fabric.util.createClass(fabric_1.fabric.G
|
|
125
125
|
top: this.top,
|
126
126
|
left: this.left,
|
127
127
|
clipPath: mask,
|
128
|
+
angle: this.angle,
|
128
129
|
});
|
129
130
|
const canvas = this?.canvas;
|
130
131
|
canvas?.remove(this.uploadedImage);
|
@@ -305,6 +306,7 @@ const toImagePlaceholderObject = (object) => {
|
|
305
306
|
color: object?.imageColor,
|
306
307
|
removeBackground: object?.removeBackground,
|
307
308
|
faceCutout: object?.faceCutout,
|
309
|
+
advancedFilter: object?.advancedFilter,
|
308
310
|
},
|
309
311
|
};
|
310
312
|
};
|
@@ -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";
|