From 011497a7bddf1dfd0e15f819bedf6aa0b27ef591 Mon Sep 17 00:00:00 2001 From: Matthew Petroff Date: Mon, 3 Jun 2024 19:58:41 -0400 Subject: [PATCH] Don't override pitch / yaw / hfov from GPano XML. Regression in 14208198aa94c25a53aeb603132d02769128c089. --- src/js/pannellum.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/pannellum.js b/src/js/pannellum.js index a7219b5..050f842 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -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