From 21ad851612156ce977cfefc59c90898fff72266a Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Wed, 31 Jul 2013 15:10:29 -0700 Subject: [PATCH] Reset filter bounds whenever it's enabled --- app/assets/javascripts/leaflet.share.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js index d43bc8ad2..d58b62313 100644 --- a/app/assets/javascripts/leaflet.share.js +++ b/app/assets/javascripts/leaflet.share.js @@ -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(); -- 2.39.5