From c6a5ba6d5856b4dceb85319823fc772a318616fb Mon Sep 17 00:00:00 2001 From: henri-edinb <66781920+henri-edinb@users.noreply.github.com> Date: Fri, 15 Jan 2021 21:21:27 +0100 Subject: [PATCH 1/2] Update Graph.jsx --- src/components/graph/Graph.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/graph/Graph.jsx b/src/components/graph/Graph.jsx index 536699b0c..1a7ce3fcf 100644 --- a/src/components/graph/Graph.jsx +++ b/src/components/graph/Graph.jsx @@ -664,6 +664,8 @@ export default class Graph extends React.Component { const svgStyle = { height: this.state.config.height, width: this.state.config.width, + 'background-color': this.state.config.backgroundColor, + 'border-style': this.state.config.border, }; const containerProps = this._generateFocusAnimationProps(); From 381425d01810d42adda3d65117e644bfe5fa2ecd Mon Sep 17 00:00:00 2001 From: henri-edinb <66781920+henri-edinb@users.noreply.github.com> Date: Sat, 20 Nov 2021 11:25:54 +0000 Subject: [PATCH 2/2] add a callback for 'while dragging' node --- src/components/graph/Graph.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/graph/Graph.jsx b/src/components/graph/Graph.jsx index 1a7ce3fcf..dcf51a31b 100644 --- a/src/components/graph/Graph.jsx +++ b/src/components/graph/Graph.jsx @@ -235,7 +235,7 @@ export default class Graph extends React.Component { draggedNode.oldX = draggedNode.x; draggedNode.oldY = draggedNode.y; - + draggedNode.x += d3Event.dx; draggedNode.y += d3Event.dy; @@ -244,6 +244,7 @@ export default class Graph extends React.Component { draggedNode["fy"] = draggedNode.y; this._tick({ draggedNode }); + this.props.onDragMoveCallBack(ev, index, nodeList, d3Event.dx, d3Event.dy) } };