customized-fabric 2.0.0 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -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({
|