customized-fabric 2.0.22 → 2.0.23
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.
@@ -104,10 +104,10 @@ const CurvedTextClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group,
|
|
104
104
|
const textPath = this.textObject.path;
|
105
105
|
if (!textPath)
|
106
106
|
return;
|
107
|
-
const pathLength = textPath.segmentsInfo?.at(-1)?.length || 0;
|
107
|
+
const pathLength = Number(textPath.segmentsInfo?.at(-1)?.length || 0);
|
108
108
|
let low = 0;
|
109
|
-
let high = this.textObject.maxFontSize;
|
110
|
-
let bestFit = this.textObject.fontSize;
|
109
|
+
let high = Number(this.textObject.maxFontSize);
|
110
|
+
let bestFit = Number(this.textObject.fontSize);
|
111
111
|
while (high - low > deltaFontSize) {
|
112
112
|
const mid = (low + high) / 2;
|
113
113
|
this.textObject.set({ fontSize: mid });
|