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

Image expand speed always gets faster for every image I expand #51

Open
clb92 opened this issue Aug 19, 2023 · 1 comment
Open

Image expand speed always gets faster for every image I expand #51

clb92 opened this issue Aug 19, 2023 · 1 comment

Comments

@clb92
Copy link

clb92 commented Aug 19, 2023

For every image I drag to expand, they get faster and faster, even with a low speed set in the options.

Is there a global 'speed' variable or something that mistakenly doesn't get reset when the user stops dragging on an image?

@howdy-tsc
Copy link
Owner

Line 1257 (2.0.9)
function resize(e) { e.preventDefault(); const nextPosX = e.pageX; node.style.width = node.offsetWidth + (nextPosX - posX) * settings.expandImageSpeed + "px"; posX = nextPosX; }

Try replacing the above with this (It will remove settings.expandImagespeed) and see if it fixes it for you. Let me know.
function resize(e) { e.preventDefault(); const nextPosX = e.pageX; node.style.width = node.offsetWidth + (nextPosX - posX) + "px"; posX = nextPosX; }

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