aboutsummaryrefslogtreecommitdiff
path: root/modern
diff options
context:
space:
mode:
authorMustafa Taha Şahin <taha.sahin@metu.edu.tr>2021-04-01 01:48:40 +0300
committerMustafa Taha Şahin <taha.sahin@metu.edu.tr>2021-04-01 01:48:40 +0300
commitd4e94f135a4092186deda57bc53ad38154cdb401 (patch)
tree560ef47ee788b0e8ac9159838539a2fdb1824a9b /modern
parentdfc2c4d23684b4dcce3e4d8a366e58040163ed51 (diff)
downloadtrackermap-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.js4
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 {