File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -593,23 +593,27 @@ function preventUnintendedZoomOnScroll(map) {
593
593
} ) ;
594
594
( 0 , _jquery2 [ "default" ] ) ( document ) . on ( "mousemove" , "*" , function ( e ) {
595
595
// Did the mouse really move?
596
- if ( lastScreen . x !== null && e . screenX !== lastScreen . x || e . screenY !== lastScreen . y ) {
597
- // It really moved. Enable zooming.
596
+ if ( map . options . scrollWheelZoom ) {
597
+ if ( lastScreen . x !== null && e . screenX !== lastScreen . x || e . screenY !== lastScreen . y ) {
598
+ // It really moved. Enable zooming.
599
+ map . scrollWheelZoom . enable ( ) ;
600
+ lastScreen = {
601
+ x : null ,
602
+ y : null
603
+ } ;
604
+ }
605
+ }
606
+ } ) ;
607
+ ( 0 , _jquery2 [ "default" ] ) ( document ) . on ( "mousedown" , ".leaflet" , function ( e ) {
608
+ // Clicking always enables zooming.
609
+ if ( map . options . scrollWheelZoom ) {
598
610
map . scrollWheelZoom . enable ( ) ;
599
611
lastScreen = {
600
612
x : null ,
601
613
y : null
602
614
} ;
603
615
}
604
616
} ) ;
605
- ( 0 , _jquery2 [ "default" ] ) ( document ) . on ( "mousedown" , ".leaflet" , function ( e ) {
606
- // Clicking always enables zooming.
607
- map . scrollWheelZoom . enable ( ) ;
608
- lastScreen = {
609
- x : null ,
610
- y : null
611
- } ;
612
- } ) ;
613
617
}
614
618
615
619
_htmlwidgets2 [ "default" ] . widget ( {
You can’t perform that action at this time.
0 commit comments