feat(nodesselection): hide on click

This commit is contained in:
moklick
2019-07-24 15:43:18 +02:00
parent ac8ac49d1d
commit 7b32ee660c
2 changed files with 20 additions and 21 deletions
+1 -3
View File
@@ -1,11 +1,10 @@
import React, { useContext } from 'react';
import { GraphContext } from '../GraphContext';
import { setNodesSelection } from '../state/actions';
export default () => {
const graphContext = useContext(GraphContext);
const { state, dispatch } = graphContext;
const { state } = graphContext;
return (
<div
@@ -13,7 +12,6 @@ export default () => {
style={{
transform: `translate(${state.transform[0]}px,${state.transform[1]}px) scale(${state.transform[2]})`
}}
onClick={() => dispatch(setNodesSelection({ isActive: false }))}
>
<div
className="react-graph__nodesselection-rect"