antvis/G6


The issue has been closed
v4.7.9 使用focusItem方法移动节点至视口中心,节点水平位置始终偏右 #5941
nancyzhan posted onGitHub
Describe the bug / 问题描述
focusItem方法未在水平位置上将矩形节点移动至中心,竖直位置可以。似乎在图中节点数较多时,水平位置会偏中心一些,但只有一个节点时完全靠右偏移至移出视口中心了 ` const animateCfg = { duration: 200, easing: 'easeCubic' }
const moveGraph = (searchNode) => {
const node = appGraph.findById(searchNode);
appGraph.focusItem(node, true, animateCfg)
}
`
Reproduction link / 重现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
无
G6 Version / G6 版本
4.x
Operating System / 操作系统
Windows
Browser / 浏览器
Chrome
Additional context / 补充说明
无