浏览代码

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

pull/86/head
Matthew Petroff 9 年前
父节点
当前提交
c66d1fff67
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      src/js/pannellum.js

+ 3
- 3
src/js/pannellum.js 查看文件

@@ -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);
};


正在加载...
取消
保存