Replies: 1 comment
-
|
fitView 函数有参数可以设置动画 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
每次扩散节点, 要执行两步
setState({
..state,
data: {
nodes: [...oldNodes, ...newNodes],
edge: [...oldEdges, ...newEdges]
}
})
setTimeout(e => {
graphRef.current.graph.fitView([20, 20])
}, 1000)
目前是在setState之后, 设置一个定时器来更新fitView, 用起来不方便的, 想问下graphin有没有页面渲染完成回调函数? 我想在回调函数里调整下页面缩放
而且目前fitView 不支持动画, 用起来卡卡的, 不知道如何才能顺滑实现
Beta Was this translation helpful? Give feedback.
All reactions