Skip to content

Commit

Permalink
Add scrollWheelZoom.enable() and disable()
Browse files Browse the repository at this point in the history
  • Loading branch information
lopezvoliver committed Aug 18, 2024
1 parent f635a68 commit 61cf2ed
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions python/jupyter_leaflet/src/Map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,14 @@ export class LeafletMapView extends LeafletDOMWidgetView {
this.obj.toggleFullscreen();
}
});
this.listenTo(this.model, 'change:scroll_wheel_zoom', () => {
const scrollWheelZoom = this.model.get('scroll_wheel_zoom');
if (scrollWheelZoom) {
this.obj.scrollWheelZoom.enable();
} else {
this.obj.scrollWheelZoom.disable();
}
});
}

processPhosphorMessage(msg: Message) {
Expand Down

0 comments on commit 61cf2ed

Please sign in to comment.