nicojeske / mousewheel-image-zoom

An Obsidian plugin that enables you to increase/decrease the size of an image by holding down a configurable key (defaults to left alt), hovering over an image in preview mode and scrolling.
MIT License
90 stars 5 forks source link

Shift horizontal scroll glitch #47

Closed Mideks closed 7 months ago

Mideks commented 8 months ago

In 342f294 you add support for horizontal scrolling, even when Shift is pressed. It doesn't work properly because if your cursor is over the image, you shouldn't scroll anymore. Otherwise we have some strange behaviour:

https://github.com/nicojeske/mousewheel-image-zoom/assets/38502324/cb3012de-f0e7-453d-b5ff-ad9e18584772

(here I just try to resize image, but page scrolls with resize)

Mideks commented 8 months ago

To reproduce this bug, you can simply shrink your window to a small size You also need to have some large content on the page, such as a large image.

nicojeske commented 8 months ago

I am currently that in my test obsidian vault (no theme, no plugins) and I am not able to reproduce this behaviour. If I paste a big image without a size in markdown obsidian just scales it so that it fits in the window. And if I set a size in markdown obsidian just cuts the image and does not let me scroll horizontally.

Mideks commented 8 months ago

Hmmm, I will try to test it in the empty vault later. If I can reproduce it, I will tell you.