Reset filter bounds whenever it's enabled

This commit is contained in:
John Firebaugh 2013-07-31 15:10:29 -07:00
parent 160f7b26e8
commit 21ad851612

View 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();