-
-
Notifications
You must be signed in to change notification settings - Fork 497
-
-
Notifications
You must be signed in to change notification settings - Fork 497
Can't have multiple Infospot or panorama link with the same image source #263
Comments
Have noticed the same even in one of the examples from @pchen66 https://codepen.io/pchen66/pen/dRYNNG |
It also seems like the one InfoSpot that gets rendered, gets deformed (width and height changed) |
I think i found the problem for this. The ImageLoader uses a cache and if he finds an image in the cache he doesn't check if it is already completely loaded. But if the image is not completely loaded the width and height is 0 and the rate is NaN and the Infospot will not be rendered correctly. This is my fix:
|
Dude good job, that works for me at the moment. You've just saved me a headache
|
I had to change the |
@leonexcc Hi, I'm new to coding. I don't understand what part to directly paste into my <script></script> code. Thanks, sorry! |
You have to change the src/loaders/ImageLoader.js and remove the lines with - and add the lines with + instead. This is something that has to changed in panolens. I can provide a Pull request if there is a chance it will be merged. Lately there are no changes to this library. |
@flyandi is taking over the project. Hopefully this will be solved soon. Thanks! |
Do u want to submit a PR for this? |
Can't provide some for the next two weeks. But i can look into this after that. |
I provided a PR. Please let me know if that works or if i have to change anything. |
Fixes a caching problem in the ImageLoader (see #263)
Is this included in the panolens min file? For some reason the fix doesn't work for me. |
Description
When I add more than one Infospot with the same image source, some of them don't appear. They do exist, I can focus them, but they are transparent.
With this code, one of the Infospots won't appear. It also happens with more than 2. I tried it with 3 Infospot with the same image source, and the second one ended up being transparent
Panolens version
Master
Browser
OS
The text was updated successfully, but these errors were encountered: