our Pano is embedded in a FancyBox so it opens like a In-Page-Popup.
Everything works fine except fullscreen: When clicking on "Toggle Fullscreen" the Pano doesn't expand to the full screen but only to the size of the FancyBox.
See my demo here: http://profanter.me/fullscreen.html
There are two possibilities to fix the wrong behaviour of Pano2VR Player:
- Implement a callback to call before Pano switches to fullscreen, so that developer can manually switch the parent div to fullscreen
- Use "position: fixed" in Pano2VR Player instead of "position: absolute" or give developer the possibility to choose if he wants "fixed" or "absolute"
As you can see in the original code (beautified), the fixed option is already implemented, but not enabled:
Code: Select all
..
this.setFullscreen = function (v) {
if (this.ill != v) {
this.ill = v;
this.lIi = true;
}
if (this.ill) {
if (1) {
divViewport.style.position = "absolute";
var li = getViewerOffset();
divViewport.style.left = window.pageXOffset - li.x + margin.left + "px";
divViewport.style.top = window.pageYOffset - li.y + margin.top + "px";
document.body.style.overflow = "hidden";
} else {
divViewport.style.position = "fixed";
}
if (l1.divSkin && l1.divSkin.ggEnterFullscreen) {
l1.divSkin.ggEnterFullscreen();
}
} else {
divViewport.style.position = "relative";
divViewport.style.left = "0px";
divViewport.style.top = "0px";
document.body.style.overflow = "";
if (l1.divSkin && l1.divSkin.ggExitFullscreen) {
l1.divSkin.ggExitFullscreen();
}
}
Iij();
};
...
Code: Select all
...
if (0) {
...
This is a lot better.
@GardenGnomeSoftware Developers:
What do you think? Do you plan to implement one of the above suggestions. My favourite is the callback.
Thanks!!
Stefan