customized-fabric 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,8 @@ 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",
|
@@ -27,7 +28,7 @@ const CurvedTextClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group,
|
|
27
28
|
fontFamily: "",
|
28
29
|
paintFirst: "stroke",
|
29
30
|
...text,
|
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({
|