Skip to content

Commit 17de8f9

Browse files
wang1212github-actions[bot]
andauthoredNov 1, 2024··
Release (#1812)
* fix: `markerStartOffset`/`markerEndOffset` of the path (#1808) * fix: `markerStartOffset` of the path in the svg renderer is drawn abnormally * fix: `markerEndOffset` of the path in the svg/canvas renderer is drawn abnormally * docs: 更新文档 * Version Packages (#1811) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore: revert demo style --------- 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 fdb1819 commit 17de8f9

File tree

113 files changed

+804
-267
lines changed

Some content is hidden

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

113 files changed

+804
-267
lines changed
 

‎__tests__/demos/bugfix/1760.ts

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import { Canvas, Path, Line } from '@antv/g';
2+
3+
/**
4+
* @see https://github.com/antvis/G/issues/1760
5+
* @see https://github.com/antvis/G/issues/1790
6+
* @see https://github.com/antvis/G/pull/1808
7+
*/
8+
export async function issue_1760(context: { canvas: Canvas }) {
9+
const { canvas } = context;
10+
await canvas.ready;
11+
12+
const arrowMarker = new Path({
13+
style: {
14+
d: 'M 10,10 L -10,0 L 10,-10 Z',
15+
stroke: '#1890FF',
16+
transformOrigin: 'center',
17+
},
18+
});
19+
const arrowMarker1 = new Path({
20+
style: {
21+
d: 'M 10,10 L -10,0 L 10,-10 Z',
22+
stroke: '#ff90FF',
23+
transformOrigin: 'center',
24+
},
25+
});
26+
27+
const path = new Path({
28+
style: {
29+
lineWidth: 1,
30+
stroke: '#54BECC',
31+
// d: 'M 0,40 L 100,100',
32+
// d: 'M 10,100 L 100,100',
33+
d: 'M 10,100 Q 100,100 150,150',
34+
// d: 'M 10,100 C 100,100 150,150 180,200',
35+
// d: 'M 10,100 A 30 50 0 0 1 162.55 162.45',
36+
// d: 'M 10,100 A 30 50 0 0 0 162.55 162.45',
37+
markerStart: arrowMarker,
38+
markerStartOffset: 30,
39+
markerEnd: arrowMarker1,
40+
markerEndOffset: 30,
41+
},
42+
});
43+
44+
const line = new Line({
45+
style: {
46+
x1: 10,
47+
y1: 150,
48+
x2: 100,
49+
y2: 150,
50+
lineWidth: 1,
51+
stroke: '#54BECC',
52+
markerStart: arrowMarker,
53+
markerStartOffset: 30,
54+
markerEnd: arrowMarker,
55+
markerEndOffset: 30,
56+
},
57+
});
58+
59+
canvas.appendChild(path);
60+
canvas.appendChild(line);
61+
}

‎__tests__/demos/bugfix/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ export { shadowroot_offset } from './1677';
77
export { gradient_text } from './1572';
88
export { zoom } from './1667';
99
export { test_pick } from './1747';
10+
export { issue_1760 } from './1760';

0 commit comments

Comments
 (0)
Please sign in to comment.