Ver código fonte

Update pannellum.js

pull/1132/head
the-ft 1 ano atrás
committed by GitHub
pai
commit
418d2fc662
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: 4AEE18F83AFDEB23
1 arquivos alterados com 11 adições e 3 exclusões
  1. +11
    -3
      src/js/pannellum.js

+ 11
- 3
src/js/pannellum.js Ver arquivo

@@ -103,6 +103,7 @@ var defaultConfig = {
showZoomCtrl: true,
autoLoad: false,
showControls: true,
workaroundFullscreen: true,
orientationOnByDefault: false,
hotSpotDebug: false,
backgroundColor: [0, 0, 0],
@@ -259,7 +260,7 @@ controls.container.appendChild(controls.zoom);
controls.fullscreen = document.createElement('div');
controls.fullscreen.addEventListener('click', toggleFullscreen);
controls.fullscreen.className = 'pnlm-fullscreen-toggle-button pnlm-sprite pnlm-fullscreen-toggle-button-inactive pnlm-controls pnlm-control';
if (document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled || document.msFullscreenEnabled)
if (document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled || document.msFullscreenEnabled || config.workaroundFullscreen))
controls.container.appendChild(controls.fullscreen);

// Device orientation toggle
@@ -2266,8 +2267,8 @@ function processOptions(isPreview) {
break;

case 'showFullscreenCtrl':
if (config[key] && config.showControls != false && ('fullscreen' in document || 'mozFullScreen' in document ||
'webkitIsFullScreen' in document || 'msFullscreenElement' in document)) {
if (config[key] && config.showControls != false && (('fullscreen' in document || 'mozFullScreen' in document ||
'webkitIsFullScreen' in document || 'msFullscreenElement' in document) || config.workaroundFullscreen) ) {
// Show fullscreen control
controls.fullscreen.style.display = 'block';
@@ -2319,6 +2320,13 @@ function processOptions(isPreview) {
*/
function toggleFullscreen() {
if (loaded && !error) {
if (container.classList.contains("pnlm-workaroundfullscreen")) {
container.classList.remove("pnlm-workaroundfullscreen");
} else {
container.classList.add("pnlm-workaroundfullscreen");
}
if (!fullscreenActive) {
try {
if (container.requestFullscreen) {


Carregando…
Cancelar
Salvar