Disabled zoom and pan when on view mode

This commit is contained in:
Lucas Oliveira 2023-08-15 12:29:19 -03:00
commit 8529c379e1

View file

@ -405,12 +405,19 @@ export default function Page({
className="theme-attribution"
minZoom={0.01}
maxZoom={8}
zoomOnDoubleClick={!view}
zoomOnScroll={!view}
zoomOnPinch={!view}
panOnDrag={!view}
panOnScroll={!view}
>
<Background className="" />
<Controls
className="bg-muted fill-foreground stroke-foreground text-primary
{!view && (
<Controls
className="bg-muted fill-foreground stroke-foreground text-primary
[&>button]:border-b-border hover:[&>button]:bg-border"
></Controls>
></Controls>
)}
</ReactFlow>
{!view && (
<Chat flow={flow} reactFlowInstance={reactFlowInstance} />