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

method setPanorama, event panorama-loaded, and changes between 3.x and 5.0 #131

Open
mycobiont opened this issue Mar 28, 2023 · 1 comment

Comments

@mycobiont
Copy link

mycobiont commented Mar 28, 2023

Thank you for a fantastic library/api! I set up a viewer application a few years back using version 3.x. Clients can move from one image to another without reloading everything... I used setPanorama to load up the next image then on the panorama-loaded event would place all the markers needed to navigate among other images. I'm now trying to upgrade all the code to version 5.0 and am currently stuck. When setPanorama is called a second time, panorama-loaded isn't firing (edit: 'ready' is not firing after a second setPanorama either). I'm not seeing any errors in the console and the setPanorama does seem to complete. I get the new image and code continues afterward just fine. I'm just not able to detect when the new image is loaded and ready. So my question is, does version 5.0 not fire panorama-loaded on subsequent uses of setPanorama? And if that is so, then is there a new/better way to know when the next image has loaded and is ready?

Thanks!

@mistic100
Copy link

Hi

you are on the wrong repository if you are using my fork => https://github.com/mistic100/Photo-Sphere-Viewer
Jeremy Heleine's last version is 2.9

to answer you questions :

  • it is normal to have only one "ready" event
  • "setPanorama" method returns a promise, that's another way to know when the panorama is loaded

Please continue this in my fork if you still have issues (with a demo of your code)

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

No branches or pull requests

2 participants