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

图片移动手势与双击冲突 #646

Open
undefined303 opened this issue Dec 9, 2024 · 0 comments
Open

图片移动手势与双击冲突 #646

undefined303 opened this issue Dec 9, 2024 · 0 comments
Labels

Comments

@undefined303
Copy link
Contributor

Viewer version

1.11.7

Link to minimal reproduction

https://fengyuanchen.github.io/viewerjs

Steps to reproduce

打开viewed,用鼠标移动图片(两次时间间隔稍微短一些)或者放大后在手机上移动图片,会触发双击的逻辑

What is expected?

现在这个双击判断就是up的时间差
但是实际上应该需要加一个移动校验
目前我的思路是down时获取原点位置 move时动态记录一系列位置坐标 计算最大位移,up时比较最大位移与移动阈值(比如10px)
如果双击的两次操作内 存在超阈滑动 则判断为无效双击 不进行toggle逻辑

What is actually happening?

滑动与双击冲突

System Info

No response

Any additional comments?

No response

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

No branches or pull requests

2 participants