Skip to content

Commit b033886

Browse files
committed
Fixed issue with mapReload (triggered with optional reset button) where storeLimit wasn't reset
1 parent 9ba87fe commit b033886

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

dist/assets/js/plugins/storeLocator/jquery.storelocator.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Google Maps Store Locator - v3.0.1 - 2018-09-11
1+
/*! jQuery Google Maps Store Locator - v3.0.1 - 2018-09-15
22
* http://www.bjornblog.com/web/jquery-store-locator-plugin
33
* Copyright (c) 2018 Bjorn Holine; Licensed MIT */
44

@@ -13,7 +13,7 @@
1313
}
1414

1515
// Variables used across multiple methods
16-
var $this, map, listTemplate, infowindowTemplate, dataTypeRead, originalOrigin, originalData, originalZoom, dataRequest, searchInput, addressInput, olat, olng, storeNum, directionsDisplay, directionsService, prevSelectedMarkerBefore, prevSelectedMarkerAfter, firstRun;
16+
var $this, map, listTemplate, infowindowTemplate, dataTypeRead, originalOrigin, originalData, originalZoom, dataRequest, searchInput, addressInput, olat, olng, storeNum, directionsDisplay, directionsService, prevSelectedMarkerBefore, prevSelectedMarkerAfter, firstRun, reload;
1717
var featuredset = [], locationset = [], normalset = [], markers = [];
1818
var filters = {}, locationData = {}, GeoCodeCalc = {}, mappingObj = {};
1919

@@ -341,6 +341,7 @@
341341
mapReload: function() {
342342
this.writeDebug('mapReload');
343343
this.reset();
344+
reload = true;
344345

345346
if ( this.settings.taxonomyFilters !== null ) {
346347
this.formFiltersReset();
@@ -2672,7 +2673,8 @@
26722673
if (
26732674
( _this.settings.fullMapStart === true && openMap === false ) ||
26742675
( _this.settings.autoGeocode === true && openMap === false ) ||
2675-
( _this.settings.defaultLoc === true && openMap === false )
2676+
( _this.settings.defaultLoc === true && openMap === false ) ||
2677+
reload === true
26762678
) {
26772679
firstRun = true;
26782680
}

dist/assets/js/plugins/storeLocator/jquery.storelocator.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ filtering.
4040
* Added custom order handling to tie into previously added custom sorting. Set order to asc or desc.
4141
* Added Google Map object as parameter to callbackBeforeSend, callbackListClick, callbackModalReady, and callbackFilters callbacks.
4242
* Changed parseJSON to native JSON.parse due to deprecation in rawData processing function.
43+
* Fixed issue with mapReload (triggered with optional reset button) where storeLimit wasn't reset.
4344
* Updated sort-example.html example with order select field.
4445

4546
### Version 3.0.0

src/js/jquery.storelocator.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010

1111
// Variables used across multiple methods
12-
var $this, map, listTemplate, infowindowTemplate, dataTypeRead, originalOrigin, originalData, originalZoom, dataRequest, searchInput, addressInput, olat, olng, storeNum, directionsDisplay, directionsService, prevSelectedMarkerBefore, prevSelectedMarkerAfter, firstRun;
12+
var $this, map, listTemplate, infowindowTemplate, dataTypeRead, originalOrigin, originalData, originalZoom, dataRequest, searchInput, addressInput, olat, olng, storeNum, directionsDisplay, directionsService, prevSelectedMarkerBefore, prevSelectedMarkerAfter, firstRun, reload;
1313
var featuredset = [], locationset = [], normalset = [], markers = [];
1414
var filters = {}, locationData = {}, GeoCodeCalc = {}, mappingObj = {};
1515

@@ -337,6 +337,7 @@
337337
mapReload: function() {
338338
this.writeDebug('mapReload');
339339
this.reset();
340+
reload = true;
340341

341342
if ( this.settings.taxonomyFilters !== null ) {
342343
this.formFiltersReset();
@@ -2668,7 +2669,8 @@
26682669
if (
26692670
( _this.settings.fullMapStart === true && openMap === false ) ||
26702671
( _this.settings.autoGeocode === true && openMap === false ) ||
2671-
( _this.settings.defaultLoc === true && openMap === false )
2672+
( _this.settings.defaultLoc === true && openMap === false ) ||
2673+
reload === true
26722674
) {
26732675
firstRun = true;
26742676
}

0 commit comments

Comments
 (0)