dimsemenov / PhotoSwipe

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

How to make images fullscreen in non modal view mode? #1011

Open COLABORATI opened 8 years ago

COLABORATI commented 8 years ago

Hi, I am fighting with too many links and infos that are only valid for the old version of photoswipe - dimsemenov, it is great what you are producing, but you shold have renamed this code so it is easier to find things on the net.

However, I would ike to have a non-modal fullsize image swipe on a simple fullscreen-photo only page, basically resembling this layout: http://jonathanbell.github.io/photoswipe/ - how to do this with the new photoswipe?

Thanks for your attention!

mjau-mjau commented 8 years ago

To achieve that, you could just open photoswipe directly on page load, and remove all options to close it. Modal or not, it would look the same.

COLABORATI commented 8 years ago

Hmm, had some troubles with this on the first try because of the missing image scaling method I knew from the old photoswipe, so it took some fiddling with no results, but I will look at it again. An example would be great, however. Thanks for your attention!

mjau-mjau commented 8 years ago

Technically, it would look something like this: https://demo.flamepix.com/galleries/nature/#&gid=1&pid=nut

In this page, we are using the #&gid to detect that it should open photoswipe directly. You could however just open it on page load by triggering photoswipe. In the background (where usually the page would be), you could just have a black background. As mentioned, photoswipe does not out-of-the-box have the 'cover' scale method I believe you are looking for.

Here is another example using Fotorama slideshow, not Photoswipe: https://demo.flamepix.com/examples/variations/slideshow/

COLABORATI commented 8 years ago

Thanks for the hints, I am progressing slowly! Fotorama is very nice too, but I had the completely unscientific impression of photoswipe beeing more robust. i iwll dig deeper, thanks for your feedback!

mjau-mjau commented 8 years ago

Photoswipe is awesome. It does require some patience with integration, because it doesn't assume anything up front like some other popups does. This ultimately makes it more powerful, and once you get the hang of it, it is by far the best image popup.