dimsemenov / PhotoSwipe

JavaScript image gallery for mobile and desktop, modular, framework independent
http://photoswipe.com
MIT License
24.11k stars 3.31k forks source link

keystrokes in zoom-pan-rotate mode #122

Closed geerto closed 13 years ago

geerto commented 13 years ago

Following occurred in Safari 5.1 and internet explorer 9. Tested on your latest examples.

In zoom-pan-rotate mode:

After left or right arrow key or mouse scroll: zoom-pan-rotate image stays in place but the carousel goes to another image which you notice after closing zoom-pan-rotate.

In FireFox 6 the page-up / down keys are making a mess. Capturing keys in firefox seems to be problematic.

I noticed this while trying to make zoom functionality using keys on desktop browser. Just to test zooming functionality without grabbing my ipad every time.

Meanwhile, I significantly improved my testpage. (It is still a testpage for analysing functionality, code can be a lot nicer organized) 1) Limiting the panning ( I believe you should have something similar and is easy to integrate in your script) 2) Auto closing on minimal zoom or jumping back to scale=1 with ‘animation’ : The fading/opacity code feels tricky to me but does the job! Only on orientation change (while in zoom-pan-rotate mode) there are flaw. I have already a solution in mind but I looking for something better.

http://users.telenet.be/geertpierloot/mobile/

codecomputerlove commented 13 years ago

I'll check keys when zoomed in. It's something I forgot about. You can zoom in on desktop by double clicking the image and panning around using the mouse.