customized-fabric 2.0.0 → 2.0.2

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.
@@ -18,16 +18,17 @@ const CurvedTextClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group,
18
18
  objectCaching: false,
19
19
  ...constants_1.CURVED_TEXT_OBJECT_ATTRIBUTES.stroke,
20
20
  });
21
- const { prefix = "", infix = "", suffix = "" } = text ?? {};
21
+ const { prefix = "", infix = "", suffix = "", isAllCapital } = text ?? {};
22
+ const fullText = prefix + infix + suffix;
22
23
  this.textObject = new fabric_1.fabric.IText("", {
23
24
  originX: "center",
24
25
  originY: "center",
25
26
  textAlign: "center",
26
27
  objectCaching: false,
27
- text: prefix + infix + suffix,
28
28
  fontFamily: "",
29
29
  paintFirst: "stroke",
30
30
  ...text,
31
+ text: isAllCapital ? fullText.toUpperCase() : fullText,
31
32
  });
32
33
  const group = new fabric_1.fabric.Group([this.rectObject, this.textObject]);
33
34
  this.set({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customized-fabric",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",