Skip to content

Commit

Permalink
incorporate suggestions from review
Browse files Browse the repository at this point in the history
  • Loading branch information
iisakkirotko committed Apr 12, 2024
1 parent 64a952c commit cbc5bfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/jupyter_leaflet/src/Map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ export class LeafletMapView extends LeafletDOMWidgetView {
const view = await this.create_child_view<LeafletControlView>(child_model, {
map_view: this,
});
// Work around for Geoman creating and adding its own toolbar
// TODO: remove the special case
if (
view instanceof LeafletGeomanDrawControlView &&
!child_model.get('hide_controls')
Expand Down
1 change: 1 addition & 0 deletions python/jupyter_leaflet/src/controls/GeomanDrawControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ export class LeafletGeomanDrawControlView extends LeafletControlView {
}

remove() {
this.map_view.obj.pm.removeControls();
this.map_view.obj.removeLayer(this.feature_group);
this.map_view.obj.off('pm:create');
this.map_view.obj.off('pm:remove');
Expand Down

0 comments on commit cbc5bfa

Please sign in to comment.