Closed kaludjer closed 6 years ago
did you try ?
Problem is because container value can be only element or ID. I changed it to allow classes and it's ok now. Thanks anyway.
So you mean you want the same sphere on multiple containers ? Clearly I will not support it.
Not same sphere, I made it gallery-like. You have for example 5 items with 5 different spheres but configuration has to be same.
ok, so why did you need to modify the library ?
Here using lodash extend and querySelector
PhotoSphereViewer(_.extend({
panorama: 'image-1.jpg',
container: document.querySelector('.container-1')
}, defaultConfig));
Anyway I strongly advise against initializing multiple viewers at once, you will get awfully slow page by doing this.
Prefer having only one viewer and use the setPanorama
method to switch between images.
Nice, tnx.
Is it possible to initialize multiple Spheres? With multiple containers ofc.