Skip to content

Commit 390bdbc

Browse files
committed
Added preventative styling to avoid table conflicts with directions panel, fixed clearMarkers bug with inline directions enabled
1 parent 662c990 commit 390bdbc

File tree

10 files changed

+41
-10
lines changed

10 files changed

+41
-10
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery-storelocator-plugin",
3-
"version": "2.2.1",
3+
"version": "2.2.2",
44
"description": "This jQuery plugin takes advantage of Google Maps API version 3 to create an easy to implement store locator. No back-end programming is required, you just need to feed it KML, XML, or JSON data with all the location information.",
55
"repository": {
66
"type": "git",

dist/assets/css/storelocator.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@
155155
.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container {
156156
width: 100%;
157157
height: 20px;
158-
position: relative; }
158+
position: relative;
159+
/* Avoid issues with table-layout */ }
160+
.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container table {
161+
table-layout: auto; }
159162
.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container .bh-sl-close-icon {
160163
top: 0;
161164
right: 6px; }

dist/assets/css/storelocator.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Google Maps Store Locator - v2.2.1 - 2015-11-27
1+
/*! jQuery Google Maps Store Locator - v2.2.1 - 2015-11-30
22
* http://www.bjornblog.com/web/jquery-store-locator-plugin
33
* Copyright (c) 2015 Bjorn Holine; Licensed MIT */
44

@@ -1130,7 +1130,16 @@
11301130
*/
11311131
clearMarkers: function() {
11321132
this.writeDebug('clearMarkers');
1133-
for (var i = 0; i < locationset.length; i++) {
1133+
var locationsLimit = null;
1134+
1135+
if (locationset.length < this.settings.storeLimit) {
1136+
locationsLimit = locationset.length;
1137+
}
1138+
else {
1139+
locationsLimit = this.settings.storeLimit;
1140+
}
1141+
1142+
for (var i = 0; i < locationsLimit; i++) {
11341143
markers[i].setMap(null);
11351144
}
11361145
},

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

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery-storelocator-plugin",
3-
"version": "2.2.1",
3+
"version": "2.2.2",
44
"description": "This jQuery plugin takes advantage of Google Maps API version 3 to create an easy to implement store locator. No back-end programming is required, you just need to feed it KML, XML, or JSON data with all the location information.",
55
"repository": {
66
"type": "git",

readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ for even faster loading.
2727

2828
## Changelog
2929

30+
### Version 2.2.2
31+
32+
* Added preventative styling to avoid table conflicts with directions panel.
33+
* Fixed clearMarkers issue with inline directions enabled.
34+
3035
### Version 2.2.1
3136

3237
* Updated preventative styling to be more specific to the map container and added max-height img rule.

src/css/storelocator.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ $arialFont: Arial, Helvetica, sans-serif;
218218
width: 100%;
219219
height: 20px;
220220
position: relative;
221+
222+
/* Avoid issues with table-layout */
223+
table {
224+
table-layout: auto;
225+
}
221226

222227
.bh-sl-close-icon {
223228
top: 0;

src/js/jquery.storelocator.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,16 @@
11271127
*/
11281128
clearMarkers: function() {
11291129
this.writeDebug('clearMarkers');
1130-
for (var i = 0; i < locationset.length; i++) {
1130+
var locationsLimit = null;
1131+
1132+
if (locationset.length < this.settings.storeLimit) {
1133+
locationsLimit = locationset.length;
1134+
}
1135+
else {
1136+
locationsLimit = this.settings.storeLimit;
1137+
}
1138+
1139+
for (var i = 0; i < locationsLimit; i++) {
11311140
markers[i].setMap(null);
11321141
}
11331142
},

storelocator.jquery.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "jQuery Google Maps Store Locator",
44
"description": "This jQuery plugin takes advantage of Google Maps API version 3 to create an easy to implement store locator. No back-end programming is required, you just need to feed it KML, XML, or JSON data with all the location information.",
55
"keywords": ["jquery","locator","store", "location", "locations", "maps", "map", "stores", "find"],
6-
"version": "2.2.1",
6+
"version": "2.2.2",
77
"author": {
88
"name": "Bjorn Holine",
99
"url": "http://www.bjornblog.com/"

0 commit comments

Comments
 (0)