customized-fabric 1.8.8 → 1.8.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,7 +17,7 @@ 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 = "", isAllCapital, lineHeight = 1, charSpacing = 0, } = text ?? {};
20
+ const { prefix = "", infix = "A", suffix = "", isAllCapital, lineHeight, charSpacing, } = text ?? {};
21
21
  const fullText = prefix + infix + suffix;
22
22
  this.textObject = new fabric_1.fabric.IText("", {
23
23
  originX: "center",
@@ -28,8 +28,8 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
28
28
  text: isAllCapital ? fullText.toUpperCase() : fullText,
29
29
  fontFamily: "",
30
30
  paintFirst: "stroke",
31
- lineHeight,
32
- charSpacing,
31
+ lineHeight: lineHeight ?? 1,
32
+ charSpacing: charSpacing ?? 0,
33
33
  });
34
34
  const group = new fabric_1.fabric.Group([this.rectObject, this.textObject]);
35
35
  this.set(group);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customized-fabric",
3
- "version": "1.8.8",
3
+ "version": "1.8.9",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",