antvis / antvis/X6

画布鼠标滚轮滚动卡顿问题

Open
#4,447 3 comments 0 reactions 0 assignees View on GitHub
oscp type: bug 缺陷
Dominant language
TypeScript
Stars
6.7k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

### 问题描述

1.当画布可滚动时,通过滚轮进行滚动,会导致后续连接桩设置边卡顿
2. 该现象只在2.x版本复现,1.x版本使用demo可正常连线
3. 该现象只会在鼠标滚轮滚动/触摸板进行滚动的时候出现,通过滚动条拖动不会有对应现象
4. 滚动后进行连接,会有1.7秒左右无法连接

### 重现链接

https://stackblitz.com/edit/react-lxvm5g-ngmnqn

### 重现步骤

1. 生成任意一节点在滚动画布上
2. 鼠标滚轮进行滚动
3. 滚动完成,通过连接桩生成边,生成的边在1.7秒内无法跟随鼠标

### 预期行为

同1.x一致/通过滚动条滚动一致,当滚动完成后,应该能够立马拖拽连接桩进行连线,现在版本卡顿

### 平台

- macOS, Windows, Linux
- Browser: Chrome
- Version: @antv/x6 2.18.1;

### 屏幕截图或视频(可选)

![antv-bug](https://github.com/user-attachments/assets/251d2bdc-caeb-419f-a63d-285daabfbb45)

### 补充说明(可选)

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz reproduction and compare connection dragging after mouse-wheel or touchpad scrolling with dragging after scrollbar movement. The fix is complete when a connection follows the cursor immediately after scrolling, matching the 1.x behavior, in the reported Chrome environments.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.