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

Getting moving right glitch issue when mouse wheel scrolling on the zoomed out browser at 67% #76

Open
momcilo330 opened this issue Sep 3, 2024 · 1 comment

Comments

@momcilo330
Copy link

Hi, I am getting scared issue when scrolling mouse wheel on the zoom out browser at like 67%
I've made a very simple code for this issue,
Here is my screenshot of code and screen.
Please fix
image
scrollIssueAt67%.webm

@momcilo330
Copy link
Author

momcilo330 commented Sep 3, 2024

I found the solution.
I think the moving glitch issue occurs due to incompatible browser's zoom with app. So there gets difference value than the real value.
By trying many times, I noticed this issue occurs when deltaX, deltaY equals to -0.5, otherwise it works well.
image

So I've fixed this issue by adding a code in file: src/InfiniteViewerManager.tsx at line 846 and 847

const deltaX = Math.abs(scrollLeft - this.scrollLeft) < 1 ? 0 : scrollLeft - this.scrollLeft;
const deltaY = Math.abs(scrollTop - this.scrollTop) < 1 ? 0 : scrollTop - this.scrollTop;

image

And you need to import the library into your source file because I don't think the admin update & build this issue soon.
In that case, you have to build this tsx file into babel js file.

Hope the Admin can fix and update soon!

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

1 participant