Skip to content

Commit

Permalink
Refactor ERDContent component to enable panning on scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
sasamuku committed Dec 13, 2024
1 parent 374d1d0 commit a677651
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 a677651

Please sign in to comment.