refactor(selection): rename to userSelection
This commit is contained in:
@@ -6,7 +6,7 @@ import ReactSizeMe from 'react-sizeme';
|
|||||||
import { GraphContext } from '../GraphContext';
|
import { GraphContext } from '../GraphContext';
|
||||||
import NodeRenderer from '../NodeRenderer';
|
import NodeRenderer from '../NodeRenderer';
|
||||||
import EdgeRenderer from '../EdgeRenderer';
|
import EdgeRenderer from '../EdgeRenderer';
|
||||||
import Selection from '../Selection';
|
import UserSelection from '../UserSelection';
|
||||||
import { updateTransform, updateSize, initD3, fitView } from '../state/actions';
|
import { updateTransform, updateSize, initD3, fitView } from '../state/actions';
|
||||||
import { useKeyPress } from '../hooks';
|
import { useKeyPress } from '../hooks';
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ const GraphView = (props) => {
|
|||||||
<div className="react-graph__renderer">
|
<div className="react-graph__renderer">
|
||||||
<NodeRenderer nodeTypes={props.nodeTypes} />
|
<NodeRenderer nodeTypes={props.nodeTypes} />
|
||||||
<EdgeRenderer width={graphContext.state.width} height={graphContext.state.height} />
|
<EdgeRenderer width={graphContext.state.width} height={graphContext.state.height} />
|
||||||
{(shiftPressed || graphContext.state.selectedNodeIds.length) && <Selection />}
|
{shiftPressed && <UserSelection />}
|
||||||
<div
|
<div
|
||||||
className="react-graph__zoompane"
|
className="react-graph__zoompane"
|
||||||
ref={zoomPane}
|
ref={zoomPane}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ function getMousePosition(evt) {
|
|||||||
return {
|
return {
|
||||||
x: evt.clientX - containerBounds.left,
|
x: evt.clientX - containerBounds.left,
|
||||||
y: evt.clientY - containerBounds.top,
|
y: evt.clientY - containerBounds.top,
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
Reference in New Issue
Block a user