From 74293c89468019254b2b5b298b8fae9d7abfc78b Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Wed, 12 Jun 2013 12:29:19 -0700 Subject: [PATCH] Fix locate button style --- vendor/assets/leaflet/leaflet.locate.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vendor/assets/leaflet/leaflet.locate.js b/vendor/assets/leaflet/leaflet.locate.js index be5c7fc01..77754d84d 100644 --- a/vendor/assets/leaflet/leaflet.locate.js +++ b/vendor/assets/leaflet/leaflet.locate.js @@ -74,7 +74,7 @@ L.Control.Locate = L.Control.extend({ } self._active = true; if (!self._event) { - self._container.className = className + " requesting"; + L.DomUtil.addClass(self._container, "requesting"); } else { visualizeLocation(); } @@ -137,7 +137,9 @@ L.Control.Locate = L.Control.extend({ if (!self._container) return; - self._container.className = className + " active"; + + L.DomUtil.removeClass(self._container, "requesting"); + L.DomUtil.addClass(self._container, "active"); }; var resetVariables = function() { @@ -151,7 +153,9 @@ L.Control.Locate = L.Control.extend({ _log('stopLocate'); map.stopLocate(); - self._container.className = className; + L.DomUtil.removeClass(self._container, "requesting"); + L.DomUtil.removeClass(self._container, "active"); + resetVariables(); self._layer.clearLayers(); -- 2.39.5