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

[v5] 事件监听失败 AFTER_ELEMENT_TRANSLATE #5687

Open
zzjjbbaa opened this issue Apr 28, 2024 · 3 comments
Open

[v5] 事件监听失败 AFTER_ELEMENT_TRANSLATE #5687

zzjjbbaa opened this issue Apr 28, 2024 · 3 comments

Comments

@zzjjbbaa
Copy link

Describe the bug

image

Your Example Website or App

Steps to Reproduce the Bug or Issue

监听不响应

Expected behavior

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

@Aarebecca
Copy link
Contributor

Aarebecca commented Apr 28, 2024

这个事件即将被移除,可以通过监听 AFTER_ELEMENT_UPDATE 中元素数据中坐标值是否发生变化来判断元素是否平移

不过平移过程中这个事件会频繁触发,所以需要进行防抖处理

@zzjjbbaa
Copy link
Author

这个事件即将被移除,可以通过监听 AFTER_ELEMENT_UPDATE 中元素数据中坐标值是否发生变化来判断元素是否平移

不过平移过程中这个事件会频繁触发,所以需要进行防抖处理

当前AFTER_ELEMENT_UPDATE事件的回调参数中只有更新后的data,而没有更新前的data,怎么判断呢?

@zzjjbbaa
Copy link
Author

这个事件即将被移除,可以通过监听 AFTER_ELEMENT_UPDATE 中元素数据中坐标值是否发生变化来判断元素是否平移
不过平移过程中这个事件会频繁触发,所以需要进行防抖处理

当前AFTER_ELEMENT_UPDATE事件的回调参数中只有更新后的data,而没有更新前的data,怎么判断呢?

结合BEFORE_ELEMENT_UPDATE来判断?

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

2 participants