-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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>
- Loading branch information
1 parent
fdb1819
commit 17de8f9
Showing
113 changed files
with
804 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { Canvas, Path, Line } from '@antv/g'; | ||
|
||
/** | ||
* @see https://github.com/antvis/G/issues/1760 | ||
* @see https://github.com/antvis/G/issues/1790 | ||
* @see https://github.com/antvis/G/pull/1808 | ||
*/ | ||
export async function issue_1760(context: { canvas: Canvas }) { | ||
const { canvas } = context; | ||
await canvas.ready; | ||
|
||
const arrowMarker = new Path({ | ||
style: { | ||
d: 'M 10,10 L -10,0 L 10,-10 Z', | ||
stroke: '#1890FF', | ||
transformOrigin: 'center', | ||
}, | ||
}); | ||
const arrowMarker1 = new Path({ | ||
style: { | ||
d: 'M 10,10 L -10,0 L 10,-10 Z', | ||
stroke: '#ff90FF', | ||
transformOrigin: 'center', | ||
}, | ||
}); | ||
|
||
const path = new Path({ | ||
style: { | ||
lineWidth: 1, | ||
stroke: '#54BECC', | ||
// d: 'M 0,40 L 100,100', | ||
// d: 'M 10,100 L 100,100', | ||
d: 'M 10,100 Q 100,100 150,150', | ||
// d: 'M 10,100 C 100,100 150,150 180,200', | ||
// d: 'M 10,100 A 30 50 0 0 1 162.55 162.45', | ||
// d: 'M 10,100 A 30 50 0 0 0 162.55 162.45', | ||
markerStart: arrowMarker, | ||
markerStartOffset: 30, | ||
markerEnd: arrowMarker1, | ||
markerEndOffset: 30, | ||
}, | ||
}); | ||
|
||
const line = new Line({ | ||
style: { | ||
x1: 10, | ||
y1: 150, | ||
x2: 100, | ||
y2: 150, | ||
lineWidth: 1, | ||
stroke: '#54BECC', | ||
markerStart: arrowMarker, | ||
markerStartOffset: 30, | ||
markerEnd: arrowMarker, | ||
markerEndOffset: 30, | ||
}, | ||
}); | ||
|
||
canvas.appendChild(path); | ||
canvas.appendChild(line); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.