From d4e94f135a4092186deda57bc53ad38154cdb401 Mon Sep 17 00:00:00 2001 From: Mustafa Taha Şahin Date: Thu, 1 Apr 2021 01:48:40 +0300 Subject: refactoring --- modern/src/map/Map.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'modern/src/map') diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js index bbb1f5ce..4bdf2fd9 100644 --- a/modern/src/map/Map.js +++ b/modern/src/map/Map.js @@ -42,10 +42,8 @@ const onIdle = function () { } }; -const isRasterMap = map => Object.values(map.getStyle().sources).some(e => e.type === 'raster'); - const setAllowedZoomLevels = map => { - if(isRasterMap(map)) { + if (Object.values(map.getStyle().sources).some(e => e.type === 'raster')) { map.scrollZoom.setWheelZoomRate(1); map.on('idle', onIdle); } else { -- cgit v1.2.3