antvis/G6

根据节点的多少展开收起节点,画布的高度也跟随改变 #4618

zhxzhx posted onGitHub

问题描述

graph.on('afteranimate', () = { const graphBBox = graph.getGroup().getCanvasBBox(); const height = graphBBox.maxY - graphBBox.minY; const width = graph.getWidth(); graph.changeSize(width, height) });

为什么这段代码加上了以后,点击展开收起的时候屏幕会闪一下呢,收起的时候闪一下流程图没有了,然后又渲染出来了,展开的时候也是流程图没有了,又渲染出来了

重现链接

重现步骤

预期行为

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]
  • G6 版本: [4.5.1 ... ]

屏幕截图或视频(可选)

补充说明(可选)


给个在线复现 demo 看看

posted by Yanyan-Wang almost 2 years ago

This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] 10 months ago

Fund this Issue

$0.00
Funded

Pull requests