Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

画布节点较多时,virtual开启,fromJSON,zoomToFit,centerContent同时调用会偶现连线丢失 #3926

Open
favorite58 opened this issue Sep 22, 2023 · 7 comments
Labels
resolution: needs demos 需要复现 Issues that need minimal demos to reproduce any problems

Comments

@favorite58
Copy link

Describe the bug

目前画布节点1000多个,virtual可视区域加载开启,在流程图初始进入时,fromJSON,zoomToFit和centerContent同时调用会偶现连线丢失问题,再就是render:done事件无效

Your Example Website or App

公司内部项目

Steps to Reproduce the Bug or Issue

1、画布节点1000多个,virtual可视区域加载开启
2、在流程图初始进入时,fromJSON,zoomToFit和centerContent同时调用

Expected behavior

大画布开启可视化区域加载后,希望同时调用fromJSON,zoomToFit和centerContent能正常渲染画布,不会出现连线丢失问题,或者是在batchUpdate批量更新中去同时执行这三个操作,画布正常渲染,连线无丢失

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 2.11.1]
  • Vue: 3.2.31
  • @antv/x6: 2.15.1
  • @antv/x6-vue-shape: 2.1.1

Additional context

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Sep 22, 2023

👋 @favorite58

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@NewByVector
Copy link
Contributor

在本地无法复现你的问题,最好还是搞个复现的 demo。此外 render:done 事件在最新的 2.15.1 版本中已经加上。

@NewByVector NewByVector added the resolution: needs demos 需要复现 Issues that need minimal demos to reproduce any problems label Sep 25, 2023
@favorite58
Copy link
Author

还发现一个问题,在项目中有多个流程图都开启了clipboard本地存储,但是我在A流程图复制后,在b粘贴就会有问题,因为节点类型不一样,甚至没有,有考虑添加clipboard 自定义存储key的功能吗?

@NewByVector
Copy link
Contributor

欢迎提 PR 呀。

@cuidong626
Copy link
Contributor

我之前也偶发这个问题,后面我觉得是不是我改的东西多了导致的bug,就把virtual关了

@Lewis-li-0
Copy link

virtual 是不是和小地图插件不兼容呢,小地图上展示不全

@OpportunityLiu
Copy link
Contributor

是不是这里的原因啊?我遇到的渲染丢失改了这个以后解决了。

image

这个函数不仅在 scheduler 内部调用,cell 属性更改的时候也会通过 cellview - renderer 调用,并且把原来设定的 flag 直接覆盖掉。如果这个 cell 刚好还没挂载,它的 FLAG_INSERT 就会被抹掉,永远也不会挂载了。

requestViewUpdate(
view: CellView,
flag: number,
options: any = {},
priority: JOB_PRIORITY = JOB_PRIORITY.Update,
flush = true,
) {
const id = view.cell.id
const viewItem = this.views[id]
if (!viewItem) {
return
}
viewItem.flag = flag
viewItem.options = options

this.graph.renderer.requestViewUpdate(this, flag, options)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: needs demos 需要复现 Issues that need minimal demos to reproduce any problems
Projects
None yet
Development

No branches or pull requests

5 participants