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

Potential fix to access denied error #84

Open
mehdi-cit opened this issue Jan 15, 2021 · 1 comment
Open

Potential fix to access denied error #84

mehdi-cit opened this issue Jan 15, 2021 · 1 comment

Comments

@mehdi-cit
Copy link

Hello and thank you for this nice library!
I had a similar issue as the one discussed in the issue: #77
The very first time we use the <Pannellum image={some_URL_1} /> with the image source some_URL_1 it works fine. But whenever the I change the image property I pass to that same Pannellum instance exp: <Pannellum image={some_URL_2} />. I get the cannot access problem (all images are hosted on the same site & the problem only appear if I change the url I pass to the image property as I said).
The problem disapears if I make a new instance Pannellum instance for every new image URL (But that's wasteful and causes flashing/re-loading ofthe whole panaroma)

I was able to "make it work" without always creating a new Pannellum instance for every new image URL. I had to comment out the line 211 in master/src/elements/Pannellum.js as seen below:
if (state === "update") { // this.panorama.destroy(); }

I diagnoally read through the code (quickly, I might have missed something) and it seems the code simply removes canvas from container and the event listeners! I also checked memory consumption and it seems to be just fine

So my question is whether it's really safe to remove that this.panorama.destroy(); call ?

Thank you again!

@bekatom
Copy link

bekatom commented Sep 7, 2022

@mehdi-cit Did you find a solution? I have the same issue

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