From 5e4a1d697b732641a26477d23516b10e3244e4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=A6=82=E6=80=80=E5=BF=B5=EF=BC=88=E4=BA=91?= =?UTF-8?q?=E8=B0=8C=EF=BC=89?= Date: Tue, 27 Aug 2024 19:45:06 +0800 Subject: [PATCH] fix: `path` elements are drawn incorrectly (#1761) * fix: `path` elements are drawn incorrectly after using `markerStartOffset` (#1760) * chore: revert package.json --- .changeset/two-parrots-film.md | 5 + demo/issues/issue-1760.html | 92 +++++++++++++++++++ package.json | 1 - .../src/paths/Path.ts | 1 - 4 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 .changeset/two-parrots-film.md create mode 100644 demo/issues/issue-1760.html diff --git a/.changeset/two-parrots-film.md b/.changeset/two-parrots-film.md new file mode 100644 index 000000000..b4018a09b --- /dev/null +++ b/.changeset/two-parrots-film.md @@ -0,0 +1,5 @@ +--- +'@antv/g-plugin-canvas-path-generator': patch +--- + +fix: `path` elements are drawn incorrectly after using `markerStartOffset` (#1760) diff --git a/demo/issues/issue-1760.html b/demo/issues/issue-1760.html new file mode 100644 index 000000000..4b4a1006f --- /dev/null +++ b/demo/issues/issue-1760.html @@ -0,0 +1,92 @@ + + + + + + issue-1760 + + + + +
+ + + + + diff --git a/package.json b/package.json index 5c9b7630b..b90d300e5 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,6 @@ "get-pixels": "3.3.3", "git-contributor": "~1.0.11", "hammerjs": "^2.0.8", - "http-server": "^14.1.1", "husky": "^7.0.4", "is-ci": "2.0.0", "jest": "^29.7.0", diff --git a/packages/g-plugin-canvas-path-generator/src/paths/Path.ts b/packages/g-plugin-canvas-path-generator/src/paths/Path.ts index f95cf0918..95189f95b 100644 --- a/packages/g-plugin-canvas-path-generator/src/paths/Path.ts +++ b/packages/g-plugin-canvas-path-generator/src/paths/Path.ts @@ -54,7 +54,6 @@ export function generatePath( // Use start marker offset if (useStartOffset) { context.moveTo(params[1] + startOffsetX, params[2] + startOffsetY); - context.lineTo(params[1], params[2]); } else { context.moveTo(params[1], params[2]); }