From 14a7032a525560b310f7db4ba0ec454bbc78bca8 Mon Sep 17 00:00:00 2001 From: Matthew Petroff Date: Tue, 23 Jan 2018 20:58:46 -0500 Subject: [PATCH] Add method to check if device orientation control is active (implements #524). --- src/js/pannellum.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/js/pannellum.js b/src/js/pannellum.js index 27d2cdf..9fc8d0b 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -2818,6 +2818,16 @@ this.startOrientation = function() { } /** + * Check if device orientation control is currently activated. + * @memberof Viewer + * @instance + * @returns {boolean} True if active, else false + */ +this.isOrientationActive = function() { + return Boolean(orientation); +} + +/** * Subscribe listener to specified event. * @memberof Viewer * @instance