Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove method changed for scalebar #547

Merged
merged 2 commits into from
May 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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