File tree 1 file changed +32
-0
lines changed
python/jupyter_leaflet/src
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -423,6 +423,38 @@ export class LeafletMapView extends LeafletDOMWidgetView {
423
423
this . obj . toggleFullscreen ( ) ;
424
424
}
425
425
} ) ;
426
+ this . listenTo ( this . model , 'change:scroll_wheel_zoom' , ( ) => {
427
+ const scrollWheelZoom = this . model . get ( 'scroll_wheel_zoom' ) ;
428
+ if ( scrollWheelZoom ) {
429
+ this . obj . scrollWheelZoom . enable ( ) ;
430
+ } else {
431
+ this . obj . scrollWheelZoom . disable ( ) ;
432
+ }
433
+ } ) ;
434
+ this . listenTo ( this . model , 'change:double_click_zoom' , ( ) => {
435
+ const doubleClickZoom = this . model . get ( 'double_click_zoom' ) ;
436
+ if ( doubleClickZoom ) {
437
+ this . obj . doubleClickZoom . enable ( ) ;
438
+ } else {
439
+ this . obj . doubleClickZoom . disable ( ) ;
440
+ }
441
+ } ) ;
442
+ this . listenTo ( this . model , 'change:touch_zoom' , ( ) => {
443
+ const touchZoom = this . model . get ( 'touch_zoom' ) ;
444
+ if ( touchZoom ) {
445
+ this . obj . touchZoom . enable ( ) ;
446
+ } else {
447
+ this . obj . touchZoom . disable ( ) ;
448
+ }
449
+ } ) ;
450
+ this . listenTo ( this . model , 'change:box_zoom' , ( ) => {
451
+ const boxZoom = this . model . get ( 'box_zoom' ) ;
452
+ if ( boxZoom ) {
453
+ this . obj . boxZoom . enable ( ) ;
454
+ } else {
455
+ this . obj . boxZoom . disable ( ) ;
456
+ }
457
+ } ) ;
426
458
}
427
459
428
460
processPhosphorMessage ( msg : Message ) {
You can’t perform that action at this time.
0 commit comments