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);
|