Skip to content

Commit b239293

Browse files
committed
Fixed issue where searching by name after searching by address, without a new address, didn't reset the origin
1 parent 5ed4027 commit b239293

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Google Maps Store Locator - v2.7.2 - 2016-11-28
1+
/*! jQuery Google Maps Store Locator - v2.7.2 - 2016-12-03
22
* http://www.bjornblog.com/web/jquery-store-locator-plugin
33
* Copyright (c) 2016 Bjorn Holine; Licensed MIT */
44

@@ -1596,6 +1596,11 @@
15961596
}
15971597
}
15981598
else if(searchInput !== '') {
1599+
// Check for existing origin and remove if address input is blank.
1600+
if ( addressInput === '' ) {
1601+
delete mappingObj.origin;
1602+
}
1603+
15991604
mappingObj.name = searchInput;
16001605
_this.mapping(mappingObj);
16011606
}

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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ filtering.
3737

3838
### Version 2.7.2
3939

40-
* Fixed incorrect origin marker parameter order.
41-
* Merged pull-request from []ollea](https://github.com/ollea) that adds "getMap" function that returns a google.maps.Map instance.
40+
* Fixed incorrect origin marker parameter order after code restructure.
41+
* Fixed [issue](https://github.com/bjorn2404/jQuery-Store-Locator-Plugin/issues/160) where searching by name after searching by address, without a new address, didn't reset the origin.
42+
* Merged pull-request from [ollea](https://github.com/ollea) that adds "getMap" function that returns a google.maps.Map instance.
4243

4344
### Version 2.7.1
4445

src/js/jquery.storelocator.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,6 +1593,11 @@
15931593
}
15941594
}
15951595
else if(searchInput !== '') {
1596+
// Check for existing origin and remove if address input is blank.
1597+
if ( addressInput === '' ) {
1598+
delete mappingObj.origin;
1599+
}
1600+
15961601
mappingObj.name = searchInput;
15971602
_this.mapping(mappingObj);
15981603
}

0 commit comments

Comments
 (0)