Skip to content

Commit

Permalink
Disable zoom if graph not in explore state
Browse files Browse the repository at this point in the history
  • Loading branch information
lubej committed Jun 28, 2023
1 parent 32395ce commit 83e2043
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/pages/HomePage/Graph/Graph/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const GraphCmp: ForwardRefRenderFunction<SVGSVGElement, GraphProps> = (
setSelectedLayer,
scale,
setActiveMobileGraphTooltip,
isZoomedIn,
},
ref,
) => {
Expand Down
4 changes: 4 additions & 0 deletions src/app/pages/HomePage/Graph/ParaTimeSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ const ParaTimeSelectorCmp: FC<ParaTimeSelectorProps> = ({ 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)
Expand Down

0 comments on commit 83e2043

Please sign in to comment.