mistic100 / Photo-Sphere-Viewer

A JavaScript library to display 360° sphere panoramas.
https://photo-sphere-viewer.js.org
MIT License
1.93k stars 686 forks source link

Showing the Gallery on phones #1370

Closed Rusachok closed 4 months ago

Rusachok commented 4 months ago

Describe your problem

I think showing Gallery with GalleryPlugin have to be different for desktop and mobile.

For example, I would like to:

  1. for desktop - show the gallery at all times (at start and after transitions) and have a button to turn it off and on.
  2. for mobile - don't show gallery, only button to show it. May be some buttons for next and prev panoramas should be for mobile.

Now I turned gallery on at start, but this is not necessary for mobile.

I can show some example from another viewer.

Clipboard_07-10-2024_01 photo_2024-07-10_12-21-42

Online demo URL

https://vi-tour.ru/s/qyjtbuht/

Photo Sphere Viewer version

5.8.2

Plugins loaded

No response

Additional context

No response

mistic100 commented 4 months ago

You should detect yourself if you are on mobile (either by screensize or tools like modernizr.js) and change the visibleOnLoad setting accordingly.

This is not by default because there are many ways and many philosophies to detect mobile phones.

Rusachok commented 4 months ago

Ok, I can do it for visibleOnLoad. And what about something like alwaysVisible - for visibility after transition?

mistic100 commented 4 months ago

I don't understand.

Rusachok commented 4 months ago

When I click on the next panorama, the gallery is hidden. I want it to always be visible to the desktop. Is some settings for it?

mistic100 commented 4 months ago

Please take some time to read the doc...

https://photo-sphere-viewer.js.org/plugins/gallery.html#hideonclick

Rusachok commented 4 months ago

Ok! Thank you very much, there is no more questions.