From a677651119be6ff0aa61a9314c32c1f83e2e81cb Mon Sep 17 00:00:00 2001 From: "ryota.sasazawa" Date: Fri, 13 Dec 2024 11:55:53 +0900 Subject: [PATCH] Refactor ERDContent component to enable panning on scroll --- .../src/components/ERDRenderer/ERDContent/ERDContent.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/ERDContent.tsx b/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/ERDContent.tsx index cbcf7f01..eb9f5aff 100644 --- a/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/ERDContent.tsx +++ b/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/ERDContent.tsx @@ -181,6 +181,8 @@ export const ERDContent: FC = ({ [setEdges], ) + const panOnDrag = [1, 2] + return (
= ({ onNodeMouseLeave={handleMouseLeaveNode} onEdgeMouseEnter={handleMouseEnterEdge} onEdgeMouseLeave={handleMouseLeaveEdge} + panOnScroll + panOnDrag={panOnDrag} + selectionOnDrag >