antvis/G6


The issue has been closed
开启全局动画和默认布局后,自定义节点动画停止 #4969
sunrisexl posted onGitHub
问题描述
在官网图表示例节点动画中,在graph中设置animate为true,并且设置layout为任意一种布局,节点动画会自动停止。怀疑是执行布局之后停止了动画,如果希望动画继续运行,该怎么处理?
重现链接
https://g6.antv.antgroup.com/examples/scatter/node/#node
重现步骤
- 进入页面
- 修改右侧代码224到244行:const graph = new G6.Graph({ container: 'container', width, height, animate: true, defaultNode: { style: { fill: '#DEE9FF', stroke: '#5B8FF9', }, }, defaultEdge: { style: { lineWidth: 1, stroke: '#b5b5b5', }, }, layout: { type: 'dagre', }, });
预期行为
期望节点动画继续运行,但是动画会停止
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
- G6 版本: [4.5.1 ... ]
屏幕截图或视频(可选)
No response
补充说明(可选)
No response