X6 icon indicating copy to clipboard operation
X6 copied to clipboard

在render:done中使用graph.centerContent,第一次不会使内容居中,第二次才会

Open yangxianxian opened this issue 2 years ago • 4 comments

Describe the bug

在render:done中使用graph.centerContent,第一次不会使内容居中,第二次才会

Your Example Website or App

Steps to Reproduce the Bug or Issue

Expected behavior

Screenshots or Videos

No response

Platform

  • Browser: [e.g. Chrome, Safari, Firefox]

Additional context

yangxianxian avatar Jul 19 '22 04:07 yangxianxian

有具体的demo吗?

babachao avatar Jul 20 '22 00:07 babachao

有具体的demo吗?

image image

使用接口返回的数据在实例化graph后直接使用centerContent和在render:done中使用都没法使内容居中

yangxianxian avatar Jul 20 '22 01:07 yangxianxian

@yangxianxian 能否提供一个可以复现的 codesanbox 链接呢?

NewByVector avatar Jul 20 '22 05:07 NewByVector

问题已找到,如果在画布实例外包裹了右键菜单Dropdown并且添加了visible,且visible由usestate控制的情况下就会发生第一次不能居中的情况

yangxianxian avatar Jul 20 '22 08:07 yangxianxian

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

x6-bot[bot] avatar Jan 31 '24 01:01 x6-bot[bot]