Skip to content

Commit

Permalink
Merge branch 'master' into default_image_src
Browse files Browse the repository at this point in the history
* master:
  remove method changed for scalebar (rstudio#547)
  • Loading branch information
schloerke committed May 15, 2018
2 parents bad26de + 6fdf2bd commit 01632fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -7,6 +7,8 @@ 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
Expand Up @@ -2064,7 +2064,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
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 01632fe

Please sign in to comment.