From 7df1c110465ec02b07fa63847f19d479a5729ef3 Mon Sep 17 00:00:00 2001 From: Santina Lin Date: Fri, 22 May 2020 08:08:34 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#44866=20react-d3-g?= =?UTF-8?q?raph:=20Add=20onClickGraph=20GraphEventCallbacks=20interface=20?= =?UTF-8?q?by=20@santina?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add onClickGraph GraphEventCallbacks interface * Modify test --- types/react-d3-graph/index.d.ts | 1 + types/react-d3-graph/react-d3-graph-tests.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/types/react-d3-graph/index.d.ts b/types/react-d3-graph/index.d.ts index d0666ecbad..9f88a48feb 100644 --- a/types/react-d3-graph/index.d.ts +++ b/types/react-d3-graph/index.d.ts @@ -114,6 +114,7 @@ export interface GraphData { } export interface GraphEventCallbacks { + onClickGraph: (event: MouseEvent) => void; onClickNode: (nodeId: string) => void; onDoubleClickNode: (nodeId: string) => void; onRightClickNode: (event: MouseEvent, nodeId: string) => void; diff --git a/types/react-d3-graph/react-d3-graph-tests.tsx b/types/react-d3-graph/react-d3-graph-tests.tsx index 5d44855bbe..d276c8bc82 100644 --- a/types/react-d3-graph/react-d3-graph-tests.tsx +++ b/types/react-d3-graph/react-d3-graph-tests.tsx @@ -6,6 +6,7 @@ export class Example extends React.Component { return (
{}} id="test" data={{ nodes: [