Преглед на файлове

add support for different panorama in fullscreen

pull/1240/head
Pavel Zbytovský преди 1 месец
родител
ревизия
5c27ae484a
променени са 3 файла, в които са добавени 26 реда и са изтрити 0 реда
  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 Целия файл

@@ -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 Целия файл

@@ -2327,6 +2327,21 @@ function processOptions(isPreview) {
function toggleFullscreen() { function toggleFullscreen() {
if (loaded && !error) { if (loaded && !error) {
if (!fullscreenActive) { 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 { try {
if (container.requestFullscreen) { if (container.requestFullscreen) {
container.requestFullscreen(); container.requestFullscreen();


+ 1
- 0
src/standalone/standalone.js Целия файл

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


Зареждане…
Отказ
Запис