Commit 1824914 Mohsen Azimi
committed
1 parent 71d438a commit 1824914 Copy full SHA for 1824914
File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,12 @@ class ScrollZoomHandler {
45
45
* @example
46
46
* map.scrollZoom.enable({ around: 'center' })
47
47
*/
48
- enable ( options = { } ) {
48
+ enable ( options ) {
49
49
if ( this . isEnabled ( ) ) return ;
50
50
this . _el . addEventListener ( 'wheel' , this . _onWheel , false ) ;
51
51
this . _el . addEventListener ( 'mousewheel' , this . _onWheel , false ) ;
52
52
this . _enabled = true ;
53
- if ( options . around === 'center' ) {
53
+ if ( options && options . around === 'center' ) {
54
54
this . _aroundCenter = true ;
55
55
} else {
56
56
this . _aroundCenter = false ;
Original file line number Diff line number Diff line change @@ -49,11 +49,11 @@ class TouchZoomRotateHandler {
49
49
* @example
50
50
* map.touchZoomRotate.enable({ around: 'center' });
51
51
*/
52
- enable ( options = { } ) {
52
+ enable ( options ) {
53
53
if ( this . isEnabled ( ) ) return ;
54
54
this . _el . addEventListener ( 'touchstart' , this . _onStart , false ) ;
55
55
this . _enabled = true ;
56
- if ( options . around === 'center' ) {
56
+ if ( options && options . around === 'center' ) {
57
57
this . _aroundCenter = true ;
58
58
} else {
59
59
this . _aroundCenter = false ;
You can’t perform that action at this time.
0 commit comments