Skip to content

Commit c492468

Browse files
Release (#1881)
* fix: text wrapping boundary cases (#1879) * fix: text wrapping boundary cases * chore: remove log * Version Packages (#1880) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 7ce64f1 commit c492468

File tree

95 files changed

+439
-53
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+439
-53
lines changed

packages/g-camera-api/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @antv/g-camera-api
22

3+
## 2.0.31
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
310
## 2.0.30
411

512
### Patch Changes

packages/g-camera-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-camera-api",
3-
"version": "2.0.30",
3+
"version": "2.0.31",
44
"description": "A simple implementation of Camera API.",
55
"keywords": [
66
"antv",

packages/g-canvas/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# @antv/g-canvas
22

3+
## 2.0.35
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
- @antv/g-plugin-canvas-path-generator@2.1.12
10+
- @antv/g-plugin-canvas-picker@2.1.14
11+
- @antv/g-plugin-canvas-renderer@2.2.14
12+
- @antv/g-plugin-dom-interaction@2.1.17
13+
- @antv/g-plugin-html-renderer@2.1.17
14+
- @antv/g-plugin-image-loader@2.1.14
15+
316
## 2.0.34
417

518
### Patch Changes

packages/g-canvas/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-canvas",
3-
"version": "2.0.34",
3+
"version": "2.0.35",
44
"description": "A renderer implemented by Canvas 2D API",
55
"keywords": [
66
"antv",

packages/g-canvaskit/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# @antv/g-canvaskit
22

3+
## 1.0.34
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
- @antv/g-plugin-canvas-path-generator@2.1.12
10+
- @antv/g-plugin-canvas-picker@2.1.14
11+
- @antv/g-plugin-canvaskit-renderer@2.1.14
12+
- @antv/g-plugin-dom-interaction@2.1.17
13+
- @antv/g-plugin-html-renderer@2.1.17
14+
- @antv/g-plugin-image-loader@2.1.14
15+
316
## 1.0.33
417

518
### Patch Changes

packages/g-canvaskit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-canvaskit",
3-
"version": "1.0.33",
3+
"version": "1.0.34",
44
"description": "A renderer implemented by CanvasKit",
55
"keywords": [
66
"antv",

packages/g-components/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @antv/g-components
22

3+
## 2.0.28
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
310
## 2.0.27
411

512
### Patch Changes

packages/g-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-components",
3-
"version": "2.0.27",
3+
"version": "2.0.28",
44
"description": "Components for g",
55
"keywords": [
66
"antv",

packages/g-dom-mutation-observer-api/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @antv/g-dom-mutation-observer-api
22

3+
## 2.0.28
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
310
## 2.0.27
411

512
### Patch Changes

packages/g-dom-mutation-observer-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-dom-mutation-observer-api",
3-
"version": "2.0.27",
3+
"version": "2.0.28",
44
"description": "A simple implementation of DOM MutationObserver API.",
55
"keywords": [
66
"antv",

packages/g-gesture/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @antv/g-gesture
22

3+
## 3.0.28
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
310
## 3.0.27
411

512
### Patch Changes

packages/g-gesture/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-gesture",
3-
"version": "3.0.27",
3+
"version": "3.0.28",
44
"description": "G Gesture",
55
"keywords": [
66
"antv",

packages/g-image-exporter/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @antv/g-image-exporter
22

3+
## 1.0.28
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
310
## 1.0.27
411

512
### Patch Changes

packages/g-image-exporter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-image-exporter",
3-
"version": "1.0.27",
3+
"version": "1.0.28",
44
"description": "A image exporter for G using DOM API",
55
"keywords": [
66
"antv",

packages/g-lite/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @antv/g-lite
22

3+
## 2.2.12
4+
5+
### Patch Changes
6+
7+
- d5e7a9f: fix: text wrapping boundary cases
8+
39
## 2.2.11
410

511
### Patch Changes

packages/g-lite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-lite",
3-
"version": "2.2.11",
3+
"version": "2.2.12",
44
"description": "A core module for rendering engine implements DOM API.",
55
"keywords": [
66
"antv",

packages/g-lite/src/services/TextService.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ export class TextService {
391391
textCharIndex += 1;
392392
txt += chars[textCharIndex];
393393
}
394-
while (calcWidth(txt) > widthThreshold) {
394+
while (calcWidth(txt) > widthThreshold && textCharIndex > 0) {
395395
textCharIndex -= 1;
396396
txt = txt.slice(0, -1);
397397
}
@@ -436,7 +436,7 @@ export class TextService {
436436
parsedStyle.isOverflowing = true;
437437

438438
if (i < chars.length - 1) {
439-
appendEllipsis(currentLineIndex, i);
439+
appendEllipsis(currentLineIndex, i - 1);
440440
}
441441

442442
break;
@@ -452,17 +452,17 @@ export class TextService {
452452
if (currentLineWidth > 0 && currentLineWidth + charWidth > maxWidth) {
453453
const result = findCharIndexClosestWidthThreshold(
454454
lines[currentLineIndex],
455-
i,
455+
i - 1,
456456
maxWidth,
457457
);
458-
if (result.textCharIndex !== i) {
458+
if (result.textCharIndex !== i - 1) {
459459
lines[currentLineIndex] = result.txt;
460460

461461
if (result.textCharIndex === chars.length - 1) {
462462
break;
463463
}
464464

465-
i = result.textCharIndex;
465+
i = result.textCharIndex + 1;
466466
char = chars[i];
467467
prevChar = chars[i - 1];
468468
nextChar = chars[i + 1];
@@ -472,7 +472,7 @@ export class TextService {
472472
if (currentLineIndex + 1 >= maxLines) {
473473
parsedStyle.isOverflowing = true;
474474

475-
appendEllipsis(currentLineIndex, i);
475+
appendEllipsis(currentLineIndex, i - 1);
476476

477477
break;
478478
}

packages/g-lottie-player/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @antv/g-lottie-player
22

3+
## 1.0.28
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
310
## 1.0.27
411

512
### Patch Changes

packages/g-lottie-player/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-lottie-player",
3-
"version": "1.0.27",
3+
"version": "1.0.28",
44
"description": "A lottie player for G",
55
"keywords": [
66
"antv",

packages/g-mobile-canvas-element/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @antv/g-mobile-canvas-element
22

3+
## 1.0.28
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
310
## 1.0.27
411

512
### Patch Changes

packages/g-mobile-canvas-element/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-mobile-canvas-element",
3-
"version": "1.0.27",
3+
"version": "1.0.28",
44
"description": "Create a CanvasLike element from existed context in mobile environment",
55
"keywords": [
66
"antv",

packages/g-mobile-canvas/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# @antv/g-mobile-canvas
22

3+
## 1.0.32
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
- @antv/g-plugin-canvas-path-generator@2.1.12
10+
- @antv/g-plugin-canvas-picker@2.1.14
11+
- @antv/g-plugin-canvas-renderer@2.2.14
12+
- @antv/g-plugin-dragndrop@2.0.28
13+
- @antv/g-plugin-gesture@2.0.28
14+
- @antv/g-plugin-image-loader@2.1.14
15+
- @antv/g-plugin-mobile-interaction@1.0.28
16+
317
## 1.0.31
418

519
### Patch Changes

packages/g-mobile-canvas/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-mobile-canvas",
3-
"version": "1.0.31",
3+
"version": "1.0.32",
44
"description": "A renderer implemented with Canvas2D API in mobile environment",
55
"keywords": [
66
"antv",

packages/g-mobile-svg/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @antv/g-mobile-svg
22

3+
## 1.0.30
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
- @antv/g-plugin-dragndrop@2.0.28
10+
- @antv/g-plugin-gesture@2.0.28
11+
- @antv/g-plugin-mobile-interaction@1.0.28
12+
- @antv/g-plugin-svg-picker@2.0.30
13+
- @antv/g-plugin-svg-renderer@2.2.12
14+
315
## 1.0.29
416

517
### Patch Changes

packages/g-mobile-svg/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-mobile-svg",
3-
"version": "1.0.29",
3+
"version": "1.0.30",
44
"description": "A renderer implemented by SVG in mobile environment",
55
"keywords": [
66
"antv",

packages/g-mobile-webgl/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# @antv/g-mobile-webgl
22

3+
## 1.0.39
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
- @antv/g-plugin-device-renderer@2.2.14
10+
- @antv/g-plugin-dragndrop@2.0.28
11+
- @antv/g-plugin-gesture@2.0.28
12+
- @antv/g-plugin-html-renderer@2.1.17
13+
- @antv/g-plugin-image-loader@2.1.14
14+
- @antv/g-plugin-mobile-interaction@1.0.28
15+
316
## 1.0.38
417

518
### Patch Changes

packages/g-mobile-webgl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-mobile-webgl",
3-
"version": "1.0.38",
3+
"version": "1.0.39",
44
"description": "A renderer implemented by WebGL1/2 in mobile environment",
55
"keywords": [
66
"antv",

packages/g-pattern/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @antv/g-pattern
22

3+
## 2.0.28
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
310
## 2.0.27
411

512
### Patch Changes

packages/g-pattern/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-pattern",
3-
"version": "2.0.27",
3+
"version": "2.0.28",
44
"description": "A pattern libs for G",
55
"keywords": [
66
"antv",

packages/g-plugin-3d/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @antv/g-plugin-3d
22

3+
## 2.0.37
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d5e7a9f]
8+
- @antv/g-lite@2.2.12
9+
- @antv/g-plugin-device-renderer@2.2.14
10+
311
## 2.0.36
412

513
### Patch Changes

packages/g-plugin-3d/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-plugin-3d",
3-
"version": "2.0.36",
3+
"version": "2.0.37",
44
"description": "Provide 3D extension for G",
55
"keywords": [
66
"antv",

0 commit comments

Comments
 (0)