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

Javascript Image Swap works in 2.2 but not > 2.2 #1206

Closed
TheWaterbug opened this issue Feb 18, 2024 · 3 comments
Closed

Javascript Image Swap works in 2.2 but not > 2.2 #1206

TheWaterbug opened this issue Feb 18, 2024 · 3 comments
Labels

Comments

@TheWaterbug
Copy link

TheWaterbug commented Feb 18, 2024

Further to my goal of rolling my own "poor man's VR," I want to allow the user to switch panoramas via a OnChange function. I lifted some code from StackExchange, and the resulting page works as expected: https://www.kan.org/Eastvale/Pano/PannellumSwitcherWorking.html [edit: code tags and links don't appear to be rendering properly, but the code is inline on the linked pages] But if I update the call to load pannellum from https://cdn.pannellum.org/2.2/pannellum.js to https://cdn.pannellum.org/2.3/pannellum.js, https://cdn.pannellum.org/2.4/pannellum.js, or https://cdn.pannellum.org/2.5/pannellum.js, then the panoramas do not render: https://www.kan.org/Eastvale/Pano/PannellumSwitcherNotWorking.html. I don't see anything in the change logs that immediately suggest why that code should stop working, but I'm not very good at this. 🤣 I want to use the latest pannellum for the orientation support. Thanks!

@TheWaterbug
Copy link
Author

Ugh. Formatting appears to be broken, and I can't figure out why. Sorry for the poor readability.

@mpetroff
Copy link
Owner

Your broken example doesn't specify the size of the lefteye element, but your working example does. Your issue has nothing to do with the change in Pannellum version; it's because you used different code to make the comparison. The element size needs to be specified.

@TheWaterbug
Copy link
Author

And I also had some incorrect paths to pannellum. Sorry to waste everyone's time.

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