Skip to content

Commit 5dd2a01

Browse files
committed
Merge pull request #458 from grahambates/master
fix: Pass popup options in all calls to marker.bindPopup()
2 parents 99ca74f + 6f47631 commit 5dd2a01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/services/leafletMarkersHelpers.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ angular.module("leaflet-directive").factory('leafletMarkersHelpers', function ($
252252
marker.closePopup();
253253
marker.unbindPopup();
254254
if (isString(markerData.message)) {
255-
marker.bindPopup(markerData.message);
255+
marker.bindPopup(markerData.message, markerData.popupOptions);
256256
}
257257
}
258258
}
@@ -269,7 +269,7 @@ angular.module("leaflet-directive").factory('leafletMarkersHelpers', function ($
269269
marker.closePopup();
270270
marker.unbindPopup();
271271
if (isString(markerData.message)) {
272-
marker.bindPopup(markerData.message);
272+
marker.bindPopup(markerData.message, markerData.popupOptions);
273273
}
274274
}
275275

@@ -287,7 +287,7 @@ angular.module("leaflet-directive").factory('leafletMarkersHelpers', function ($
287287
// There is some text in the popup, so we must show the text or update existing
288288
if (isString(markerData.message) && !isString(oldMarkerData.message)) {
289289
// There was no message before so we create it
290-
marker.bindPopup(markerData.message);
290+
marker.bindPopup(markerData.message, markerData.popupOptions);
291291
if (markerData.focus === true) {
292292
// If the focus is set, we must open the popup, because we do not know if it was opened before
293293
marker.openPopup();

0 commit comments

Comments
 (0)