Skip to content

Commit

Permalink
Merge pull request #236 from liam-hq/enable_figma_like_view
Browse files Browse the repository at this point in the history
feat: Enable panning on scroll
  • Loading branch information
MH4GF authored Dec 13, 2024
2 parents 374d1d0 + a677651 commit 306fe20
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ export const ERDContent: FC<Props> = ({
[setEdges],
)

const panOnDrag = [1, 2]

return (
<div className={styles.wrapper}>
<ReactFlow
Expand All @@ -196,6 +198,9 @@ export const ERDContent: FC<Props> = ({
onNodeMouseLeave={handleMouseLeaveNode}
onEdgeMouseEnter={handleMouseEnterEdge}
onEdgeMouseLeave={handleMouseLeaveEdge}
panOnScroll
panOnDrag={panOnDrag}
selectionOnDrag
>
<Background
color="var(--color-gray-600)"
Expand Down

0 comments on commit 306fe20

Please sign in to comment.