diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-04-05 20:15:17 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-04-05 20:15:17 -0700 |
commit | dbd9a093caf6df8f5ed50801c40b5e15e7726f59 (patch) | |
tree | 52afde885dca4dffdaf6e5e5473238c7620a56f6 /modern/src/map/Map.js | |
parent | 5bfcb85c789fcc9fdff8e4eb10c2952fa17969e5 (diff) | |
download | trackermap-web-dbd9a093caf6df8f5ed50801c40b5e15e7726f59.tar.gz trackermap-web-dbd9a093caf6df8f5ed50801c40b5e15e7726f59.tar.bz2 trackermap-web-dbd9a093caf6df8f5ed50801c40b5e15e7726f59.zip |
Revert zoom changes
Diffstat (limited to 'modern/src/map/Map.js')
-rw-r--r-- | modern/src/map/Map.js | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js index d83c297d..8a43e97b 100644 --- a/modern/src/map/Map.js +++ b/modern/src/map/Map.js @@ -93,23 +93,6 @@ const Map = ({ children }) => { }; }, []); - useEffect(() => { - if (mapReady && Object.values(map.getStyle().sources).some(e => e.type === 'raster')) { - const onIdle = function () { - const zoom = Math.round(map.getZoom()); - if (zoom !== map.getZoom()) { - map.zoomTo(zoom); - } - }; - map.scrollZoom.setWheelZoomRate(1); - map.on('idle', onIdle); - return () => { - map.scrollZoom.setWheelZoomRate(1/450); - map.off('idle', onIdle); - } - } - }, [mapReady]); - useLayoutEffect(() => { const currentEl = containerEl.current; currentEl.appendChild(element); |