|
@@ -19,7 +19,6 @@ export interface D3GraphEditableProps {
|
|
|
|
|
|
export function D3GraphEditable(props: D3GraphEditableProps) {
|
|
|
const [mouseDownNode, setMouseDownNode] = React.useState<D3OnionNodeData | null>(null);
|
|
|
- // const [showCrossHair, setShowCrossHair] = React.useState<bool>(false);
|
|
|
const onionContext = React.useContext<OnionContextType>(OnionContext);
|
|
|
|
|
|
const mouseDownHandler = React.useCallback((event, {x,y}, mouseDownNode: D3OnionNodeData | undefined) => {
|
|
@@ -90,7 +89,7 @@ export function D3GraphEditable(props: D3GraphEditableProps) {
|
|
|
props.onUserEdit?.(deltas, description);
|
|
|
}
|
|
|
setMouseDownNode(null);
|
|
|
- }, [mouseDownNode, onionContext]);
|
|
|
+ }, [mouseDownNode, onionContext, props.onUserEdit]);
|
|
|
|
|
|
return <D3Graph
|
|
|
graph={props.graph}
|