svelte-image-encoder icon indicating copy to clipboard operation
svelte-image-encoder copied to clipboard

Variable zoom speed

Open www-chique opened this issue 3 years ago • 0 comments

I noticed that for really large images (more than 3000x3000), the zoom is too fast initially. However, I could fix it by changing the delta / factor here: updateScale(transform, transform.getScale() - delta / 10, e.offsetX, e.offsetY); Tweaking that "10" or other values here solves the issue. So I was thinking if it's possible to make it configurable as a property? Or somehow adjust it based on the image's dimension.

I am a newbie at this, so maybe someone else has a better way to implement this.

www-chique avatar Mar 06 '21 13:03 www-chique