Skip to content
This repository was archived by the owner on Nov 7, 2023. It is now read-only.

Commit f464f9c

Browse files
committed
fix(labels): labels added to existing markers are now bound
1 parent ce42dcf commit f464f9c

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

dist/angular-leaflet-directive.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* angular-leaflet-directive 0.8.4 2015-06-22
2+
* angular-leaflet-directive 0.8.4 2015-06-23
33
* angular-leaflet-directive - An AngularJS directive to easily interact with Leaflet maps
44
* git: https://github.com/tombatossals/angular-leaflet-directive
55
*/
@@ -2249,7 +2249,7 @@ angular.module("leaflet-directive").service('leafletMarkersHelpers', ["$rootScop
22492249
if (isDefined(markerData.label) && isDefined(markerData.label.message)) {
22502250
if ('label' in oldMarkerData && 'message' in oldMarkerData.label && !angular.equals(markerData.label.message, oldMarkerData.label.message)) {
22512251
marker.updateLabelContent(markerData.label.message);
2252-
} else if (!angular.isFunction(marker.getLabel)) {
2252+
} else if (!angular.isFunction(marker.getLabel) || angular.isFunction(marker.getLabel) && !isDefined(marker.getLabel())) {
22532253
marker.bindLabel(markerData.label.message, markerData.label.options);
22542254
_manageOpenLabel(marker, markerData);
22552255
} else {

dist/angular-leaflet-directive.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.

dist/angular-leaflet-directive_dev_mapped.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.

dist/angular-leaflet-directive_dev_mapped.js.map

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

src/services/leafletMarkersHelpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ angular.module("leaflet-directive").service('leafletMarkersHelpers', function ($
320320
if (isDefined(markerData.label) && isDefined(markerData.label.message)) {
321321
if ('label' in oldMarkerData && 'message' in oldMarkerData.label && !angular.equals(markerData.label.message, oldMarkerData.label.message)) {
322322
marker.updateLabelContent(markerData.label.message);
323-
} else if (!angular.isFunction(marker.getLabel)) {
323+
} else if (!angular.isFunction(marker.getLabel) || angular.isFunction(marker.getLabel) && !isDefined(marker.getLabel())) {
324324
marker.bindLabel(markerData.label.message, markerData.label.options);
325325
_manageOpenLabel(marker, markerData);
326326
} else {

0 commit comments

Comments
 (0)