customized-fabric 1.7.6 → 1.7.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.6",
3
+ "version": "1.7.7",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",