From 83e2043702fdc82858a3d52c7679f6b1d3c38d92 Mon Sep 17 00:00:00 2001 From: lubej <9722540+lubej@users.noreply.github.com> Date: Tue, 27 Jun 2023 18:29:01 +0200 Subject: [PATCH] Disable zoom if graph not in explore state --- src/app/pages/HomePage/Graph/Graph/index.tsx | 1 + src/app/pages/HomePage/Graph/ParaTimeSelector/index.tsx | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/app/pages/HomePage/Graph/Graph/index.tsx b/src/app/pages/HomePage/Graph/Graph/index.tsx index 4e2df3be3..9a25e09a0 100644 --- a/src/app/pages/HomePage/Graph/Graph/index.tsx +++ b/src/app/pages/HomePage/Graph/Graph/index.tsx @@ -91,6 +91,7 @@ const GraphCmp: ForwardRefRenderFunction = ( setSelectedLayer, scale, setActiveMobileGraphTooltip, + isZoomedIn, }, ref, ) => { diff --git a/src/app/pages/HomePage/Graph/ParaTimeSelector/index.tsx b/src/app/pages/HomePage/Graph/ParaTimeSelector/index.tsx index 0e14f7051..653fd9aae 100644 --- a/src/app/pages/HomePage/Graph/ParaTimeSelector/index.tsx +++ b/src/app/pages/HomePage/Graph/ParaTimeSelector/index.tsx @@ -195,6 +195,10 @@ const ParaTimeSelectorCmp: FC = ({ disabled, step, setSte } const onPinchZoom = ({ x, y, scale }: UpdateAction) => { + if (step !== ParaTimeSelectorStep.Explore) { + return + } + const transformValue = make3dTransformValue({ x, y, scale }) setScale(scale) quickPinchZoomInnerRef.current?.style.setProperty('transform', transformValue)