Open aPaci95 opened 4 years ago
Yeah I've briefly looked into it and I think there's a couple ways it could work. I was initially thinking of allowing touchpad pinch to zoom (like how mobile sites work). It would be pretty responsive but that wouldn't work on desktops and it'll cut off parts of cards. (Also not sure if it's possible) Another option is to use a JavaScript library that just keeps the image footprint the same size but just allows you to zoom in with scroll or something If you got thoughts or find a good image zoom implementation online let me know
Basically how I envision the pinch to zoom would work: (I'm just throwing ideas out) https://anvaka.github.io/panzoom/demo/dom.html
Actually number 2 on this page looks pretty slick https://wittlock.github.io/ngx-image-zoom/
Basically how I envision the pinch to zoom would work: (I'm just throwing ideas out) https://anvaka.github.io/panzoom/demo/dom.html
This one is great, but honestly i don't think i can help you much as i don't know how these things work. When i submitted this feature request i was just thinking about an option like "scale image with zoom: true/false) and images being scaled accordingly (if i zoom 150% my text, i would like to have the image zoomed 150% too). But it is great to have more options!!! You're doing a wonderful job for the anki community, thank you (i also love your other addon, "no distraction")
Yeah I was just throwing some ideas around. The only issue I see with the inbuilt zoom is that it'll start cutting off large images if you zoom in, and using the scrollbars to move around seems tedious.
If you wanna test out a beta build with some click and zoom functionality, check it out here (just download and run). I'm not in love with it, but I'm curious to hear other thoughts. anki zoom v1.2
I tried but unfortunately it doesn't work
:( sorry you have to click on an image to get it to activate. Does that not work either? I appreciate the help!
I fixed a bug that might've been causing the issue if you want to try again
Yeah I was just throwing some ideas around. The only issue I see with the inbuilt zoom is that it'll start cutting off large images if you zoom in, and using the scrollbars to move around seems tedious. If you wanna test out a beta build with some click and zoom functionality, check it out here (just download and run). I'm not in love with it, but I'm curious to hear other thoughts. anki zoom v1.2
Hey man, I'm so hyped to try the beta with the image zoom functionality, but unfortunately, I got this message :
can you please fix it ? or should I change something to make it work ? (using anki 2.1.21 here)
Sweet thanks for testing. It should be fixed now - can you try the link again?
It's pretty awesome man !! It's working as it should, one thing that is bothering me a little, -and it's not your fault in any way- is that the zooming functionality is limited by the size of the image, so you will end up zooming, but within a small window which is the actual size of the image (in other words , you are still confined by the actual borders/window of the image) ,something which is especially noticeable in small & longitudinal pictures that has height>width like A4 screenshots for example : as far as everything else , it's working like charms !! Thanx man.
Basically how I envision the pinch to zoom would work: (I'm just throwing ideas out) https://anvaka.github.io/panzoom/demo/dom.html
I think this type of zooming would solve the problem !!?
Yeah that was by design - I figured that people would want to keep text and formatting the same while zooming the images. But after using it for a while - I agree - it was bothering me how limited the zoom area is.
I'll look into implementing that mobile-like zoom you pointed out. But I think how zoom works right now is still needed since it plays well with text (e.g. word-wrap). I guess i'll have 2 zoom options and people can pick by using different modifier keys? (like control+scroll for normal zoom and shift+scroll for mobile zoom?)
Should it be possible right now to zoom in on images with the current ankiweb version, or the github release, or the master branch? Or is the beta obtainable somewhere else?
Background: My exemplar of the add-on (from Ankiweb) zooms in only on image occlusion cards, but not on images in the "image" field of a cloze card.
Would it be possible to add an option to make the zoom affect the images also?