ugcinc-render 1.8.112 → 1.8.113
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.
- package/dist/index.js +7 -3
- package/dist/index.mjs +7 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3601,9 +3601,11 @@ function calculateAutoWidthAndLines2({
|
|
|
3601
3601
|
const testLine = currentLine + word;
|
|
3602
3602
|
const testWidth = measureText(testLine);
|
|
3603
3603
|
const WRAP_TOLERANCE = 0.5;
|
|
3604
|
-
if (testWidth > availableWidth + WRAP_TOLERANCE
|
|
3605
|
-
|
|
3606
|
-
|
|
3604
|
+
if (testWidth > availableWidth + WRAP_TOLERANCE) {
|
|
3605
|
+
if (currentLine.trim()) {
|
|
3606
|
+
lines.push(currentLine.trimEnd());
|
|
3607
|
+
currentLine = "";
|
|
3608
|
+
}
|
|
3607
3609
|
const wordWidth = measureText(word);
|
|
3608
3610
|
if (wordWidth > availableWidth) {
|
|
3609
3611
|
let remainingWord = word;
|
|
@@ -3625,6 +3627,8 @@ function calculateAutoWidthAndLines2({
|
|
|
3625
3627
|
remainingWord = remainingWord.substring(breakPoint);
|
|
3626
3628
|
}
|
|
3627
3629
|
}
|
|
3630
|
+
} else {
|
|
3631
|
+
currentLine = word;
|
|
3628
3632
|
}
|
|
3629
3633
|
} else {
|
|
3630
3634
|
currentLine = testLine;
|
package/dist/index.mjs
CHANGED
|
@@ -2670,9 +2670,11 @@ function calculateAutoWidthAndLines2({
|
|
|
2670
2670
|
const testLine = currentLine + word;
|
|
2671
2671
|
const testWidth = measureText(testLine);
|
|
2672
2672
|
const WRAP_TOLERANCE = 0.5;
|
|
2673
|
-
if (testWidth > availableWidth + WRAP_TOLERANCE
|
|
2674
|
-
|
|
2675
|
-
|
|
2673
|
+
if (testWidth > availableWidth + WRAP_TOLERANCE) {
|
|
2674
|
+
if (currentLine.trim()) {
|
|
2675
|
+
lines.push(currentLine.trimEnd());
|
|
2676
|
+
currentLine = "";
|
|
2677
|
+
}
|
|
2676
2678
|
const wordWidth = measureText(word);
|
|
2677
2679
|
if (wordWidth > availableWidth) {
|
|
2678
2680
|
let remainingWord = word;
|
|
@@ -2694,6 +2696,8 @@ function calculateAutoWidthAndLines2({
|
|
|
2694
2696
|
remainingWord = remainingWord.substring(breakPoint);
|
|
2695
2697
|
}
|
|
2696
2698
|
}
|
|
2699
|
+
} else {
|
|
2700
|
+
currentLine = word;
|
|
2697
2701
|
}
|
|
2698
2702
|
} else {
|
|
2699
2703
|
currentLine = testLine;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugcinc-render",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.113",
|
|
4
4
|
"description": "Unified rendering package for UGC Inc - shared types, components, and compositions for pixel-perfect client/server rendering",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|