Browse Source

Add error for when panorama image isn't specified.

pull/101/head
Matthew Petroff 9 years ago
parent
commit
82d1bc4b4e
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/js/pannellum.js

+ 5
- 0
src/js/pannellum.js View File

@@ -198,6 +198,7 @@ function init() {
div.innerHTML = "<!--[if lte IE 9]><i></i><![endif]-->"; div.innerHTML = "<!--[if lte IE 9]><i></i><![endif]-->";
if (div.getElementsByTagName("i").length == 1) { if (div.getElementsByTagName("i").length == 1) {
anError(); anError();
return;
} }
var i, p; var i, p;
@@ -219,6 +220,10 @@ function init() {
} }
panoImage = c; panoImage = c;
} else { } else {
if (config.panorama === undefined) {
anError('No panorama image was specified.');
return;
}
if (config.video === true) { if (config.video === true) {
panoImage = document.createElement('video'); panoImage = document.createElement('video');
infoDisplay.load.lbox.style.display = 'block'; infoDisplay.load.lbox.style.display = 'block';


Loading…
Cancel
Save