]> git.openstreetmap.org Git - rails.git/commitdiff
Reset filter bounds whenever it's enabled
authorJohn Firebaugh <john.firebaugh@gmail.com>
Wed, 31 Jul 2013 22:10:29 +0000 (15:10 -0700)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Mon, 5 Aug 2013 15:32:44 +0000 (08:32 -0700)
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();