From dbd9a093caf6df8f5ed50801c40b5e15e7726f59 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 5 Apr 2021 20:15:17 -0700 Subject: Revert zoom changes --- modern/src/map/Map.js | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'modern/src/map/Map.js') diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js index d83c297..8a43e97 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); -- cgit v1.2.3