feat(nodesselection): hide on click
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user