philips / supernote-obsidian-plugin

Supernote A5, A5X, A6X, A6X2 (Nomad) integration for Obsidian. Generate markdown, capture screen mirror, and more.
MIT License
92 stars 3 forks source link

enhancement: limit image width with a setting #22

Open james-xli opened 2 months ago

james-xli commented 2 months ago

First, thanks for making this plugin. It's great to be able to use my Supernote with Obsidian.

When viewing notes, I would like to limit the width of the page images so that they don't appear too large. (I have a Nomad, which is physically not very large.) At normal desktop window sizes, the page images tend to appear very zoomed in, requiring a lot of scrolling. My current workaround is to make my Obsidian window very narrow.

Not sure if there is an existing solution to this, or if this is already in your plans.

Thank you!

philips commented 2 months ago

That is odd. Are you using a custom theme with Obsidian? I am using the default theme on macOS with version 1.5.12 and the images are scaled to the window size.

james-xli commented 2 months ago

Hi, thanks for the quick response!

I am also using the default theme on macOS with Obsidian v1.5.12.

Let me try to clarify my question. When I make my Obsidian window narrow (screenshot below), my note images are small enough that I can see the whole page in my window, and the handwriting size is not much bigger than the text size in Obsidian. It is easy to scroll through multiple pages.

Screenshot 2024-05-10 at 7 24 18 AM

When I make the Obsidian window wider, then the note images scale to the window size as you described. I can see how this might be useful sometimes, but for my use it makes the notes harder to scan and scroll through because they are so large:

Screenshot 2024-05-10 at 7 24 39 AM

So I'm looking for a way to limit how big the page images can scale, so that I can scan and scroll through multiple pages more quickly.

Just a usability feature suggestion, feel free to ignore or deprioritize :)

philips commented 2 months ago

I added an FAQ entry on this. I suggest you try the Mousewheel Image zoom plugin: https://github.com/philips/supernote-obsidian-plugin/tree/main?tab=readme-ov-file#faq

james-xli commented 2 months ago

Hi, thanks for the suggestion and FAQ update!

I gave the plugin a try; it works great on images embedded in .md files, but it doesn't seem to have any effect on previews directly in .note files. My question is about .note files, not .md files with images embedded. Sorry if that context wasn't clear before!

I have some free time today so I might try forking your repo and tinkering a bit. Will share here if my efforts bear any fruit!

philips commented 2 months ago

@james-xli I think the trick with the .note preview is that there isn't a natural spot to store the adjusted zoom level in the .note as I only have a .note parser not a .note generator. So, you would have this metadata, the zoom level, but no place to store it.

I guess I could have a max px setting in the settings pane and just let people specify a max. Would that accomplish your desire?

james-xli commented 2 months ago

I think a max px width setting in the settings pane would be perfect! No need for it to be a per-note or per-image setting.