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

Compatibility with ITS Theme image positions #8

Closed AngelusDomini closed 2 years ago

AngelusDomini commented 2 years ago

Would be great if this plugin were compatible with the ITS image positions snippet from the ITS Theme. Currently, when using the plugin to resize an image that's using the snippet, it doesn't do anything except add another size number thingy in the link, which doesn't actually resize the image in preview.

E.g., when resizing an image with this link: ![[image.png|ctr|525]]

it then becomes something like this: ![[image.png|500|ctr|525]] but does nothing to actually resize it in preview.

Currently, I'd have to resize the image without using the ITS position syntax thingy first and then add the desired syntax (ctr/left/right/etc) to the link.

Hope you'll consider. Thank you for this wonderful plugin!

nicojeske commented 2 years ago

Hello There!

The ITS position syntax should now be supported in the newest release.

If you still encounter problems feel free to reopen this Issue.

AngelusDomini commented 2 years ago

Hey, @nicojeske thank you so much for getting this to work! The only problem I've encountered so far is when using the plugin on images in tables, where the problem I described in my original post persists, except that the pipe | starts with a backslash \ which is necessary for markdown tables, so:

![[image.png\|ctr\|525]] becomes ![[image.png\|500\|ctr\|525]]

With images not using the ITS syntax, the plugin works as expected while respecting the backslash

nicojeske commented 2 years ago

@AngelusDomini It should now work in version 1.0.12 could you try it out and keep me updated?

AngelusDomini commented 2 years ago

Yep, it's working now! Thanks again so much!