@antv/g-lite 2.2.11 → 2.2.12
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.esm.js +8 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.umd.min.js +4 -4
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @antv/g-lite
|
|
3
3
|
* @description A core module for rendering engine implements DOM API.
|
|
4
|
-
* @version 2.2.
|
|
5
|
-
* @date 12/26/2024,
|
|
4
|
+
* @version 2.2.12
|
|
5
|
+
* @date 12/26/2024, 12:57:25 PM
|
|
6
6
|
* @author AntVis
|
|
7
7
|
* @docs https://g.antv.antgroup.com/
|
|
8
8
|
*/
|
|
@@ -11501,7 +11501,7 @@ var TextService = /*#__PURE__*/function () {
|
|
|
11501
11501
|
textCharIndex += 1;
|
|
11502
11502
|
txt += chars[textCharIndex];
|
|
11503
11503
|
}
|
|
11504
|
-
while (calcWidth(txt) > widthThreshold) {
|
|
11504
|
+
while (calcWidth(txt) > widthThreshold && textCharIndex > 0) {
|
|
11505
11505
|
textCharIndex -= 1;
|
|
11506
11506
|
txt = txt.slice(0, -1);
|
|
11507
11507
|
}
|
|
@@ -11533,7 +11533,7 @@ var TextService = /*#__PURE__*/function () {
|
|
|
11533
11533
|
if (currentLineIndex + 1 >= maxLines) {
|
|
11534
11534
|
parsedStyle.isOverflowing = true;
|
|
11535
11535
|
if (i < chars.length - 1) {
|
|
11536
|
-
appendEllipsis(currentLineIndex, i);
|
|
11536
|
+
appendEllipsis(currentLineIndex, i - 1);
|
|
11537
11537
|
}
|
|
11538
11538
|
break;
|
|
11539
11539
|
}
|
|
@@ -11543,13 +11543,13 @@ var TextService = /*#__PURE__*/function () {
|
|
|
11543
11543
|
continue;
|
|
11544
11544
|
}
|
|
11545
11545
|
if (currentLineWidth > 0 && currentLineWidth + charWidth > maxWidth) {
|
|
11546
|
-
var result = findCharIndexClosestWidthThreshold(lines[currentLineIndex], i, maxWidth);
|
|
11547
|
-
if (result.textCharIndex !== i) {
|
|
11546
|
+
var result = findCharIndexClosestWidthThreshold(lines[currentLineIndex], i - 1, maxWidth);
|
|
11547
|
+
if (result.textCharIndex !== i - 1) {
|
|
11548
11548
|
lines[currentLineIndex] = result.txt;
|
|
11549
11549
|
if (result.textCharIndex === chars.length - 1) {
|
|
11550
11550
|
break;
|
|
11551
11551
|
}
|
|
11552
|
-
i = result.textCharIndex;
|
|
11552
|
+
i = result.textCharIndex + 1;
|
|
11553
11553
|
_char2 = chars[i];
|
|
11554
11554
|
prevChar = chars[i - 1];
|
|
11555
11555
|
nextChar = chars[i + 1];
|
|
@@ -11557,7 +11557,7 @@ var TextService = /*#__PURE__*/function () {
|
|
|
11557
11557
|
}
|
|
11558
11558
|
if (currentLineIndex + 1 >= maxLines) {
|
|
11559
11559
|
parsedStyle.isOverflowing = true;
|
|
11560
|
-
appendEllipsis(currentLineIndex, i);
|
|
11560
|
+
appendEllipsis(currentLineIndex, i - 1);
|
|
11561
11561
|
break;
|
|
11562
11562
|
}
|
|
11563
11563
|
currentLineIndex += 1;
|