Browse Source

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

Regression in 14208198aa.
pull/1238/head
Matthew Petroff 5 months ago
parent
commit
011497a7bd
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/js/pannellum.js

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

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


Loading…
Cancel
Save