refactor(selection): rename to userSelection

This commit is contained in:
moklick
2019-07-24 11:02:25 +02:00
parent d4507855a4
commit 9baf1d5b7c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import ReactSizeMe from 'react-sizeme';
import { GraphContext } from '../GraphContext';
import NodeRenderer from '../NodeRenderer';
import EdgeRenderer from '../EdgeRenderer';
import Selection from '../Selection';
import UserSelection from '../UserSelection';
import { updateTransform, updateSize, initD3, fitView } from '../state/actions';
import { useKeyPress } from '../hooks';
@@ -74,7 +74,7 @@ const GraphView = (props) => {
<div className="react-graph__renderer">
<NodeRenderer nodeTypes={props.nodeTypes} />
<EdgeRenderer width={graphContext.state.width} height={graphContext.state.height} />
{(shiftPressed || graphContext.state.selectedNodeIds.length) && <Selection />}
{shiftPressed && <UserSelection />}
<div
className="react-graph__zoompane"
ref={zoomPane}
@@ -20,7 +20,7 @@ function getMousePosition(evt) {
return {
x: evt.clientX - containerBounds.left,
y: evt.clientY - containerBounds.top,
}
};
}
export default () => {