customized-fabric 2.0.13 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,7 @@ const CurvedTextClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group,
|
|
32
32
|
lengthRatio: 0.4,
|
33
33
|
positionAngle: 0,
|
34
34
|
maxFontSize: 200,
|
35
|
+
strokeLineJoin: "round",
|
35
36
|
...text,
|
36
37
|
text: isAllCapital ? fullText.toUpperCase() : fullText,
|
37
38
|
});
|
@@ -222,7 +223,6 @@ const toCurvedTextObject = (object) => {
|
|
222
223
|
pathSide: textObject?.pathSide,
|
223
224
|
positionAngle: textObject?.positionAngle,
|
224
225
|
isAllCapital: textObject?.isAllCapital,
|
225
|
-
strokeLineJoin: textObject?.strokeLineJoin,
|
226
226
|
},
|
227
227
|
};
|
228
228
|
};
|
@@ -32,7 +32,6 @@ export declare const toTextInputObject: (object: TextInput) => {
|
|
32
32
|
isAllCapital: any;
|
33
33
|
lineHeight: number | undefined;
|
34
34
|
charSpacing: number | undefined;
|
35
|
-
strokeLineJoin: string | undefined;
|
36
35
|
};
|
37
36
|
};
|
38
37
|
export default class TextInput extends fabric.Group {
|
@@ -24,6 +24,7 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
|
|
24
24
|
originY: "center",
|
25
25
|
textAlign: "center",
|
26
26
|
objectCaching: false,
|
27
|
+
strokeLineJoin: "round",
|
27
28
|
...text,
|
28
29
|
text: isAllCapital ? fullText.toUpperCase() : fullText,
|
29
30
|
fontFamily: "",
|
@@ -47,6 +48,11 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
|
|
47
48
|
this.autoChangeFontSize(0.1);
|
48
49
|
this.canvas?.renderAll?.();
|
49
50
|
});
|
51
|
+
this.on("modified", () => {
|
52
|
+
this.textObject.set({ maxFontSize: Math.min(this.width, this.height) });
|
53
|
+
this.autoChangeFontSize(0.1);
|
54
|
+
this.canvas?.renderAll?.();
|
55
|
+
});
|
50
56
|
this.set({
|
51
57
|
_id: new objectId_1.ObjectId().toString(),
|
52
58
|
name: constants_1.TEXT_INPUT_OBJECT_ATTRIBUTES.name,
|
@@ -188,7 +194,6 @@ const toTextInputObject = (object) => {
|
|
188
194
|
isAllCapital: textObject?.isAllCapital,
|
189
195
|
lineHeight: textObject?.lineHeight,
|
190
196
|
charSpacing: textObject?.charSpacing,
|
191
|
-
strokeLineJoin: textObject?.strokeLineJoin,
|
192
197
|
},
|
193
198
|
};
|
194
199
|
};
|