Skip to content

Commit

Permalink
remove method changed for scalebar (rstudio#547)
Browse files Browse the repository at this point in the history
* remove method changed for scalebar

* add news line about remove scalebar fix
  • Loading branch information
schloerke committed May 15, 2018
1 parent c2f386f commit 6fdf2bd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ leaflet 2.0.0.9000
BUG FIXES

* `.leaflet-map-pane` `z-index` switched to 'auto'. Allows for map panes to appear above the map if they appear later in the dom. (#537)
* Use correct Leaflet.js scale control remove method (#547)


leaflet 2.0.0
--------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion inst/htmlwidgets/leaflet.js
Original file line number Diff line number Diff line change
Expand Up @@ -2058,7 +2058,7 @@ methods.addScaleBar = function (options) {

methods.removeScaleBar = function () {
if (this.currentScaleBar) {
this.currentScaleBar.removeFrom(this);
this.currentScaleBar.remove();
this.currentScaleBar = null;
}
};
Expand Down
2 changes: 1 addition & 1 deletion javascript/src/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ methods.addScaleBar = function(options) {

methods.removeScaleBar = function() {
if (this.currentScaleBar) {
this.currentScaleBar.removeFrom(this);
this.currentScaleBar.remove();
this.currentScaleBar = null;
}
};
Expand Down

0 comments on commit 6fdf2bd

Please sign in to comment.