From 685e89b2e4a3b21f1f6d7aa51d10479e815d02a7 Mon Sep 17 00:00:00 2001 From: Matthew Petroff Date: Sun, 1 Jan 2017 14:54:02 -0500 Subject: [PATCH] Add API method to check if a panorama is loaded. --- src/js/pannellum.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/js/pannellum.js b/src/js/pannellum.js index 54b249f..12172c9 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -2136,6 +2136,16 @@ function escapeHTML(s) { } /** + * Checks whether or not a panorama is loaded. + * @memberof Viewer + * @instance + * @returns {boolean} `true` if a panorama is loaded, else `false` + */ +this.isLoaded = function() { + return loaded; +}; + +/** * Returns the pitch of the center of the view. * @memberof Viewer * @instance