Skip to content

Commit

Permalink
refactor(selection): rename to userSelection
Browse files Browse the repository at this point in the history
  • Loading branch information
moklick committed Jul 24, 2019
1 parent d450785 commit 9baf1d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/GraphView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion src/Selection/index.js → src/UserSelection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function getMousePosition(evt) {
return {
x: evt.clientX - containerBounds.left,
y: evt.clientY - containerBounds.top,
}
};
}

export default () => {
Expand Down

0 comments on commit 9baf1d5

Please sign in to comment.