New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open in fullscreen mode #851
Comments
It's fine method, but ideally – you should at first enter fullscreen and only then init PhotoSwipe. I'd recommend to fork the default UI and exclude default fullscreen feature entirely.
Make sure that you aren't calling any method on PhotoSwipe that is already destroyed (closed). |
Hi, the issue with _listeners also affects my project, my question is - any time I close (by clicking on close button) photoSwipe - should I init() again ? or create new instance ? |
@rodislav,
Create new instance. |
ok, got it |
could you please add an example how to implement this the right way? I also would like to have a no-thumbnail gallery that starts in fullscreen mode directly when visiting the site. Currently I played with the examples, but when hitting the esc key the page is blank (as there is nothing else). It would be really nice if photoswipe supported a fullscreen gallery by default. Here is a fork of the old photoswipe that shows very well, what I want, but it is, well, based on the old version... would be great to have this in your version! Thanks for your attention! |
hi thank you. |
I developed a library to allow PhotoSwipe to open in fullscreen mode with support for deep linking to specific gallery images. Here's the code needed to do so, which uses the fetchInject([
'/css/vendor/photoswipe/photoswipe.css',
'/css/vendor/photoswipe/default-skin/default-skin.css',
'/js/vendor/photoswipe/photoswipe.min.js',
'/js/vendor/photoswipe/photoswipe-ui-default.min.js'
]).then(() => {
initPhotoSwipeFromDOM('[itemtype="http://schema.org/ImageGallery"]')
}) It loads everything in asynchronously in parallel, so you won't need to add any More info here: |
Hello everyone, the way I solve this problem was like this:
Hope it helps! |
This will not work in mobile |
Is there a current/planed option for this?
I'm actually using this:
is this a good approach?
Also i'm listening on
fullscreenchange
event and closing the photoswipe when fullscreen exited:it works well however a error thrown when exiting by pressing esc key.
looks like
_listeners
is already null heretemporarily fixed like this:
The text was updated successfully, but these errors were encountered: