Skip to content
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

Can't zoom page on mobile (outside viewer) #783

Closed
sidelux opened this issue Nov 16, 2022 · 6 comments
Closed

Can't zoom page on mobile (outside viewer) #783

sidelux opened this issue Nov 16, 2022 · 6 comments
Assignees
Labels
Milestone

Comments

@sidelux
Copy link

sidelux commented Nov 16, 2022

Hello.
I'm using the latest version of library.
This is my js code:
const viewer = new PhotoSphereViewer.Viewer({ container: document.querySelector('#wall_viewer'), panorama: 'images/IMG_20221113_180732_00_merged.jpg', loadingTxt: 'Carico...', autorotateDelay: 3000, autorotateIdle: true, navbar: ['zoom'], });

And my html code:
<div id="wall_viewer" style="width: 100vw; height: 50vh;"></div>

My problem is that when a user try to pinch (zoom) on a mobile device, zoom does not work. Only works inside the viewer but not in all of the page.

How can be fix this?

Thanks

@mistic100
Copy link
Owner

How is this a problem ? I don't understand why it would zoom if you do not interact with the viewer.

@sidelux
Copy link
Author

sidelux commented Nov 16, 2022

If i try to pinch to zoom in other webpage area it does not zoom as default behavior to a browser when the library is loaded.
Probably is the same problem as described in #592.

Below a screenshot that shows that in red areas i can't pinch to zoom the webpage with Chrome on iOS.

img

@mistic100
Copy link
Owner

Absolutely not the same problem, the forementionned issue is about not being able to zoom on the viewer.

Did you try to only disable the viewer ? (comment the Viewer instanciation but leave everything else as it). If it stil does not work then it is not a problem with PSV.

Perhaps you have a meta which prevent page zoom

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">

@sidelux
Copy link
Author

sidelux commented Nov 16, 2022

If i remove the library the pinch to zoom works well, so i think this is a problem where the library catch the zoom event of all of the page instead of only the specific area.
My meta tag is <meta name="viewport" content="width=device-width, initial-scale=1.0">

@mistic100 mistic100 added the bug label Nov 16, 2022
@mistic100 mistic100 self-assigned this Nov 16, 2022
@mistic100 mistic100 added this to the 4.8.0 milestone Nov 16, 2022
@mistic100
Copy link
Owner

Thank you for the exact test case, the fix will be released soon.

@github-actions
Copy link

This feature/bug fix has been released in version 4.8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants