customized-fabric 1.8.7 → 1.8.8

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 } = text ?? {};
20
+ const { prefix = "", infix = "A", suffix = "", isAllCapital, lineHeight = 1, charSpacing = 0, } = text ?? {};
21
21
  const fullText = prefix + infix + suffix;
22
22
  this.textObject = new fabric_1.fabric.IText("", {
23
23
  originX: "center",
@@ -28,6 +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
33
  });
32
34
  const group = new fabric_1.fabric.Group([this.rectObject, this.textObject]);
33
35
  this.set(group);
@@ -19,6 +19,8 @@ export interface ITextInputOptions extends fabric.IGroupOptions {
19
19
  infix?: string;
20
20
  suffix?: string;
21
21
  isAllCapital?: boolean;
22
+ lineHeight?: number;
23
+ charSpacing?: number;
22
24
  };
23
25
  fontUrl?: string;
24
26
  isOriginal?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customized-fabric",
3
- "version": "1.8.7",
3
+ "version": "1.8.8",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",