Added max zoom based off of map size and normalized wheelY by window height

This commit is contained in:
Mitchell McCaffrey
2020-10-22 12:51:37 +11:00
parent c1e67b716c
commit 1c79032f30
5 changed files with 20 additions and 4 deletions

View File

@@ -8,6 +8,7 @@ import useMapImage from "../../helpers/useMapImage";
import usePreventOverscroll from "../../helpers/usePreventOverscroll";
import useKeyboard from "../../helpers/useKeyboard";
import useStageInteraction from "../../helpers/useStageInteraction";
import { getMapMaxZoom } from "../../helpers/map";
import { MapInteractionProvider } from "../../contexts/MapInteractionContext";
import MapStageContext, {
@@ -88,6 +89,7 @@ function MapInteraction({
stageScale,
setStageScale,
stageTranslateRef,
getMapMaxZoom(map),
selectedToolId,
preventMapInteraction,
{