antvis/G6





Do you want to work on this issue?
You can request for a bounty in order to promote it!
[Bug]: In Polyline, the marker is set to move along the edge, and the angle problem is calculated, and there is a problem of repeated jumps during movement #6601
lhz7695001 posted onGitHub
Describe the bug / 问题描述
在自定义边中通过创建marker后,希望marker随边移动并且随着边的方向旋转,目前通过animation.onframe()方法中获取到每一帧marker的坐标和边的target的坐标的deg,最后设置marker.setAttribute("transform", [["rotate", deg]]),出现marker在边上反复跳跃的情况,如下图:
market旋转代码:
复现链接: https://stackblitz.com/edit/vitejs-vite-ah6g4m?file=src%2FApp.vue
希望各位专家给个思路,或者帮忙调整下,万分感谢!!!
Reproduction link / 复现链接
https://stackblitz.com/edit/vitejs-vite-ah6g4m?file=src%2FApp.vue
Steps to Reproduce the Bug or Issue / 重现步骤
No response
G6 Version / G6 版本
🆕 5.x
OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他