Bläddra i källkod

add support for different panorama in fullscreen

pull/1240/head
Pavel Zbytovský 1 månad sedan
förälder
incheckning
5c27ae484a
3 ändrade filer med 26 tillägg och 0 borttagningar
  1. +10
    -0
      examples/example-fullscreenPanorama.htm
  2. +15
    -0
      src/js/pannellum.js
  3. +1
    -0
      src/standalone/standalone.js

+ 10
- 0
examples/example-fullscreenPanorama.htm Visa fil

@@ -0,0 +1,10 @@
<!DOCTYPE HTML>
<html>
<head>
<title>pannellum embed example</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<iframe width="480" height="390" allowfullscreen style="border-style:none;" src="../src/standalone/pannellum.htm#panorama=../../examples/examplepano-640.jpg&amp;panoramaFullscreen=../../examples/examplepano.jpg&amp;autoLoad=true&amp;showZoomCtrl=false&amp;autoRotate=-1"></iframe>
</body>
</html>

+ 15
- 0
src/js/pannellum.js Visa fil

@@ -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();


+ 1
- 0
src/standalone/standalone.js Visa fil

@@ -67,6 +67,7 @@ function parseURLParameters() {
case 'fallback':
case 'preview':
case 'panorama':
case 'panoramaFullscreen':
case 'config':
configFromURL[option] = decodeURIComponent(value);
break;


Laddar…
Avbryt
Spara