diff --git a/examples/example-fullscreenPanorama.htm b/examples/example-fullscreenPanorama.htm new file mode 100644 index 0000000..6e80b2a --- /dev/null +++ b/examples/example-fullscreenPanorama.htm @@ -0,0 +1,10 @@ + + + + pannellum embed example + + + + + + diff --git a/src/js/pannellum.js b/src/js/pannellum.js index ead7333..a7f866c 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -2327,6 +2327,21 @@ function processOptions(isPreview) { function toggleFullscreen() { if (loaded && !error) { if (!fullscreenActive) { + if (config.panoramaFullscreen) { + var p = ''; + if (config.basePath) { + p = config.basePath; + } + p = absoluteURL(config.panoramaFullscreen) ? config.panoramaFullscreen : p + config.panoramaFullscreen; + + var panoImageFullscreen = document.createElement('img'); + panoImageFullscreen.src = p; + panoImageFullscreen.onload = function() { + panoImage = panoImageFullscreen; + onImageLoad(); + } + } + try { if (container.requestFullscreen) { container.requestFullscreen(); diff --git a/src/standalone/standalone.js b/src/standalone/standalone.js index c33155a..8e414b8 100644 --- a/src/standalone/standalone.js +++ b/src/standalone/standalone.js @@ -67,6 +67,7 @@ function parseURLParameters() { case 'fallback': case 'preview': case 'panorama': + case 'panoramaFullscreen': case 'config': configFromURL[option] = decodeURIComponent(value); break;