]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.share.js
Reset filter bounds whenever it's enabled
[rails.git] / app / assets / javascripts / leaflet.share.js
index d43bc8ad26665dd64ead12a4962f5655a1324f12..d58b62313b21eb62c918f5d8b1a4b1e92b637417 100644 (file)
@@ -243,10 +243,7 @@ L.OSM.share = function (options) {
 
     function toggleFilter() {
       if ($(this).is(':checked')) {
-        if (!locationFilter.getBounds().isValid()) {
-          locationFilter.setBounds(map.getBounds().pad(-0.2));
-        }
-
+        locationFilter.setBounds(map.getBounds().pad(-0.2));
         locationFilter.enable();
       } else {
         locationFilter.disable();