Disabled zoom and pan when on view mode
This commit is contained in:
parent
3667f4812e
commit
8529c379e1
1 changed files with 10 additions and 3 deletions
|
|
@ -405,12 +405,19 @@ export default function Page({
|
||||||
className="theme-attribution"
|
className="theme-attribution"
|
||||||
minZoom={0.01}
|
minZoom={0.01}
|
||||||
maxZoom={8}
|
maxZoom={8}
|
||||||
|
zoomOnDoubleClick={!view}
|
||||||
|
zoomOnScroll={!view}
|
||||||
|
zoomOnPinch={!view}
|
||||||
|
panOnDrag={!view}
|
||||||
|
panOnScroll={!view}
|
||||||
>
|
>
|
||||||
<Background className="" />
|
<Background className="" />
|
||||||
|
{!view && (
|
||||||
<Controls
|
<Controls
|
||||||
className="bg-muted fill-foreground stroke-foreground text-primary
|
className="bg-muted fill-foreground stroke-foreground text-primary
|
||||||
[&>button]:border-b-border hover:[&>button]:bg-border"
|
[&>button]:border-b-border hover:[&>button]:bg-border"
|
||||||
></Controls>
|
></Controls>
|
||||||
|
)}
|
||||||
</ReactFlow>
|
</ReactFlow>
|
||||||
{!view && (
|
{!view && (
|
||||||
<Chat flow={flow} reactFlowInstance={reactFlowInstance} />
|
<Chat flow={flow} reactFlowInstance={reactFlowInstance} />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue