From 4242e7c53aec68780d298456f92ea88b02575b14 Mon Sep 17 00:00:00 2001 From: Will Calderbank Date: Wed, 5 Dec 2018 23:15:26 +0000 Subject: [PATCH] Add stopMovement to stop all movement (#690) Add `stopMovement` to stop all movement --- src/js/pannellum.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/js/pannellum.js b/src/js/pannellum.js index 077fa57..51feb0d 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -2713,6 +2713,16 @@ this.stopAutoRotate = function() { }; /** + * Stops all movement. + * @memberof Viewer + * @instance + */ +this.stopMovement = function() { + stopAnimation(); + speed = {'yaw': 0, 'pitch': 0, 'hfov': 0}; +} + +/** * Returns the panorama renderer. * @memberof Viewer * @instance