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

Implement zooming functionality for all canvas nodes #48

Closed Mideks closed 7 months ago

Mideks commented 7 months ago

Note: Due to ongoing issue #47, normal scaling is temporarily restricted to use with the Alt key.

Related to: #37

nicojeske commented 7 months ago

Sorry for just now looking at your PR. I tested it and the zooming on the canvas works as expected!

I just did minor changes to remove deprecated warnings and fix typing (unfortunately by just spamming any as there are no type definitions yet for the canvas API).

I also added a little workaround for the problem in #47 that is not perfect, but should at least be usable.

Mideks commented 7 months ago

@nicojeske

unfortunately by just spamming any as there are no type definitions yet for the canvas API

Huh, yes. I did not find any documentation for canvas and I just reverseenering these canvas functions... I can't say it is was easy, but it was an interesting experience.