diff options
author | Mustafa Taha Şahin <taha.sahin@metu.edu.tr> | 2021-04-01 01:48:40 +0300 |
---|---|---|
committer | Mustafa Taha Şahin <taha.sahin@metu.edu.tr> | 2021-04-01 01:48:40 +0300 |
commit | d4e94f135a4092186deda57bc53ad38154cdb401 (patch) | |
tree | 560ef47ee788b0e8ac9159838539a2fdb1824a9b /modern | |
parent | dfc2c4d23684b4dcce3e4d8a366e58040163ed51 (diff) | |
download | trackermap-web-d4e94f135a4092186deda57bc53ad38154cdb401.tar.gz trackermap-web-d4e94f135a4092186deda57bc53ad38154cdb401.tar.bz2 trackermap-web-d4e94f135a4092186deda57bc53ad38154cdb401.zip |
refactoring
Diffstat (limited to 'modern')
-rw-r--r-- | modern/src/map/Map.js | 4 |
1 files changed, 1 insertions, 3 deletions
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 { |