From 6d5a75bcf7c902de08b67d4c842216f6f180de04 Mon Sep 17 00:00:00 2001 From: pearcetm Date: Thu, 28 Jul 2022 17:53:49 -0400 Subject: [PATCH] Bugfix for enable/disable methods for Buttons Fixes https://github.com/openseadragon/openseadragon/issues/2185 --- src/button.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/button.js b/src/button.js index 4431983f..c3a84a82 100644 --- a/src/button.js +++ b/src/button.js @@ -398,6 +398,7 @@ $.extend( $.Button.prototype, $.EventSource.prototype, /** @lends OpenSeadragon. disable: function(){ this.notifyGroupExit(); this.element.disabled = true; + this.tracker.setTracking(false); $.setElementOpacity( this.element, 0.2, true ); }, @@ -406,6 +407,7 @@ $.extend( $.Button.prototype, $.EventSource.prototype, /** @lends OpenSeadragon. */ enable: function(){ this.element.disabled = false; + this.element.setTracking(true); $.setElementOpacity( this.element, 1.0, true ); this.notifyGroupEnter(); },