customized-fabric 1.7.5 → 1.7.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,6 @@ const ImagePlaceholderClass = fabric_1.fabric.util.createClass(fabric_1.fabric.G
33
33
  imageType: "Full color",
34
34
  objectCaching: false,
35
35
  objectFit: "cover",
36
- clipPath: this.rectObject,
37
36
  });
38
37
  if (options?.isOriginal) {
39
38
  this.rectObject?.set({ strokeWidth: 0 });
@@ -52,7 +51,7 @@ const ImagePlaceholderClass = fabric_1.fabric.util.createClass(fabric_1.fabric.G
52
51
  }
53
52
  }
54
53
  if (options?.imageSettings) {
55
- const { type, color, removeBackground, faceCutout, advancedFilter, objectFit, } = options?.imageSettings;
54
+ const { type, color, removeBackground, faceCutout, advancedFilter, objectFit = "cover", } = options?.imageSettings;
56
55
  if (type) {
57
56
  this.setImageType(type);
58
57
  }
@@ -17,14 +17,15 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
17
17
  objectCaching: false,
18
18
  ...constants_1.TEXT_INPUT_OBJECT_ATTRIBUTES.stroke,
19
19
  });
20
- const { prefix = "", infix = "A", suffix = "" } = text ?? {};
20
+ const { prefix = "", infix = "A", suffix = "", isAllCapital } = text ?? {};
21
+ const fullText = prefix + infix + suffix;
21
22
  this.textObject = new fabric_1.fabric.IText("", {
22
23
  originX: "center",
23
24
  originY: "center",
24
25
  textAlign: "center",
25
26
  objectCaching: false,
26
27
  ...text,
27
- text: prefix + infix + suffix,
28
+ text: isAllCapital ? fullText.toUpperCase() : fullText,
28
29
  fontFamily: "",
29
30
  paintFirst: "stroke",
30
31
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customized-fabric",
3
- "version": "1.7.5",
3
+ "version": "1.7.7",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",