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

Scroller插件的autoResize是否能进行优化 #4086

Open
liuzaijiang opened this issue Dec 11, 2023 · 3 comments
Open

Scroller插件的autoResize是否能进行优化 #4086

liuzaijiang opened this issue Dec 11, 2023 · 3 comments

Comments

@liuzaijiang
Copy link

liuzaijiang commented Dec 11, 2023

功能描述

版本:"@antv/x6-plugin-scroller": "^2.0.10"

由于对于scroller的onUpdate方法进行了消抖操作,且时间为写死的200ms,在用户体验上不太友好,是否考虑优化一下
源码:

this.onUpdate = FunctionExt.debounce(this.onUpdate, 200)

GIF 2023-12-11 16-35-18

期望解决方案

解决方案:

  1. 暴露出这个刷新控制时间给用户自己控制
autoResize: boolean | {  interval: number }
  1. 把监听model.on('cell:changed')的方法改为监听nodeedgemoveing事件,不进行消抖处理,这里不清楚为什么要监听cell:changed事件,而且真的要进行操作优化也应该是throttle而不是debounce
@PatrickChen928
Copy link

这个有计划修复吗

@PatrickChen928
Copy link

不仅延时问题,线的距离也没有算进去
image

@itwmike
Copy link

itwmike commented Jun 7, 2024

同问,这个确实体验不好

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants