Quellcode durchsuchen

Fix bug that caused compass to be displayed for images with GPano data but no heading.

pull/86/head
Matthew Petroff vor 9 Jahren
Ursprung
Commit
c66d1fff67
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. +3
    -3
      src/js/pannellum.js

+ 3
- 3
src/js/pannellum.js Datei anzeigen

@@ -384,11 +384,11 @@ function parseGPanoXMP(image) {
// Extract the requested tag from the XMP data
var getTag = function(tag) {
var result = xmpData.substring(xmpData.indexOf(tag + '="') + tag.length + 2);
result = result.substring(0, result.indexOf('"'));
if (result.length === 0) {
if (xmpData.indexOf(tag + '="') < 0) {
return null;
}
var result = xmpData.substring(xmpData.indexOf(tag + '="') + tag.length + 2);
result = result.substring(0, result.indexOf('"'));
return Number(result);
};


Laden…
Abbrechen
Speichern