JeremyHeleine / Photo-Sphere-Viewer

A JavaScript library to display Photo Sphere panoramas.
851 stars 943 forks source link

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

Open mycobiont opened 1 year ago

mycobiont commented 1 year ago

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 commented 1 year ago

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 :

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