Skip to content

Commit d6e3ecf

Browse files
committed
Moved compileMessage outside of noHide check, thus compiling message even if label is hidden.
1 parent c879355 commit d6e3ecf

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/services/leafletMarkersHelpers.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,26 +130,20 @@ angular.module("leaflet-directive").factory('leafletMarkersHelpers', function ($
130130
}
131131
}
132132
}
133-
134-
//deprecated in favor of manageOpenLabel
135-
if (Helpers.LabelPlugin.isLoaded() && isDefined(markerData.label) && isDefined(markerData.label.options) && markerData.label.options.noHide === true) {
136-
if (compileMessage) {
137-
$compile(marker.label._container)(markerScope);
138-
}
139-
marker.showLabel();
140-
}
141133
};
142134

143135
var _manageOpenLabel = function(marker, markerData) {
144136
var markerScope = angular.isFunction(markerData.getMessageScope) ? markerData.getMessageScope() : $rootScope,
145137
labelScope = angular.isFunction(markerData.getLabelScope) ? markerData.getLabelScope() : markerScope,
146138
compileMessage = isDefined(markerData.compileMessage) ? markerData.compileMessage : true;
147139

148-
if (Helpers.LabelPlugin.isLoaded() && isDefined(markerData.label) && isDefined(markerData.label.options) && markerData.label.options.noHide === true) {
140+
if (Helpers.LabelPlugin.isLoaded() && isDefined(markerData.label)) {
141+
if (isDefined(markerData.label.options) && markerData.label.options.noHide === true) {
142+
marker.showLabel();
143+
}
149144
if (compileMessage) {
150145
$compile(marker.label._container)(labelScope);
151146
}
152-
marker.showLabel();
153147
}
154148
}
155149

0 commit comments

Comments
 (0)