antvis / antvis/X6

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

Open
#3,926 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.7k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

### 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_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with more than 1,000 nodes, virtual rendering enabled, and the fromJSON, zoomToFit, and centerContent calls during initial load. Observe the render:done event and inspect whether connections disappear after these operations or when they are grouped in batchUpdate. Done means the canvas renders all connections reliably and render:done behaves as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.