Sfoglia il codice sorgente

Don't override pitch / yaw / hfov from GPano XML.

Regression in 14208198aa.
pull/1238/head
Matthew Petroff 5 mesi fa
parent
commit
011497a7bd
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. +4
    -4
      src/js/pannellum.js

+ 4
- 4
src/js/pannellum.js Vedi File

@@ -629,11 +629,11 @@ function parseGPanoXMP(image, url) {
config.horizonRoll = xmp.horizonRoll;
}
if (xmp.pitch != null && specifiedPhotoSphereExcludes.indexOf('pitch') < 0)
if (xmp.pitch !== null && specifiedPhotoSphereExcludes.indexOf('pitch') < 0)
config.pitch = xmp.pitch;
if (xmp.yaw != null && specifiedPhotoSphereExcludes.indexOf('yaw') < 0)
if (xmp.yaw !== null && specifiedPhotoSphereExcludes.indexOf('yaw') < 0)
config.yaw = xmp.yaw;
if (xmp.hfov != null && specifiedPhotoSphereExcludes.indexOf('hfov') < 0)
if (xmp.hfov !== null && specifiedPhotoSphereExcludes.indexOf('hfov') < 0)
config.hfov = xmp.hfov;
}
}
@@ -2111,7 +2111,7 @@ function renderHotSpots() {
function mergeConfig(sceneId) {
config = {};
var k, s;
var photoSphereExcludes = ['haov', 'vaov', 'vOffset', 'northOffset', 'horizonPitch', 'horizonRoll'];
var photoSphereExcludes = ['haov', 'vaov', 'vOffset', 'northOffset', 'horizonPitch', 'horizonRoll', 'pitch', 'yaw', 'hfov'];
specifiedPhotoSphereExcludes = [];
// Merge default config


Caricamento…
Annulla
Salva