Skip to content

Commit f448c72

Browse files
fix markercluster permanent/noHide tooltip for L.tooltip
1 parent 03d6b38 commit f448c72

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

R/layers.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ markerClusterDependencies <- function() {
631631
list(
632632
htmltools::htmlDependency(
633633
'leaflet-markercluster',
634-
'0.5.0',
634+
'1.0.4',
635635
system.file('htmlwidgets/plugins/Leaflet.markercluster', package = 'leaflet'),
636636
script = c('leaflet.markercluster.js', 'leaflet.markercluster.layersupport-src.js', 'leaflet.markercluster.freezable-src.js'),
637637
stylesheet = c('MarkerCluster.css', 'MarkerCluster.Default.css')

inst/htmlwidgets/leaflet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,8 +1316,8 @@ function addMarkers(map, df, group, clusterOptions, clusterId, markerFunc) {
13161316
var labelOptions = df.get(i, "labelOptions");
13171317
if (label !== null) {
13181318
if (labelOptions !== null) {
1319-
if (labelOptions.noHide) {
1320-
marker.bindTooltip(label, labelOptions).showLabel();
1319+
if (labelOptions.permanent) {
1320+
marker.bindTooltip(label, labelOptions).openTooltip();
13211321
} else {
13221322
marker.bindTooltip(label, labelOptions);
13231323
}

javascript/src/methods.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function addMarkers(map, df, group, clusterOptions, clusterId, markerFunc) {
166166
if (label !== null) {
167167
if (labelOptions !== null) {
168168
if(labelOptions.permanent) {
169-
marker.bindTooltip(label, labelOptions).showLabel();
169+
marker.bindTooltip(label, labelOptions).openTooltip();
170170
} else {
171171
marker.bindTooltip(label, labelOptions);
172172
}

0 commit comments

Comments
 (0)