feat: display the pointer when in selection mode.

This commit is contained in:
Jack Fishwick
2022-11-22 11:05:48 +00:00
parent 64c8491761
commit a8e414e4a2
2 changed files with 9 additions and 2 deletions
@@ -136,7 +136,6 @@ const UserSelection = memo(
y: mousePos.y < startY ? mousePos.y : startY,
width: Math.abs(mousePos.x - startX),
height: Math.abs(mousePos.y - startY),
draw: true,
};
const { nodeInternals, edges, transform, onNodesChange, onEdgesChange, nodeOrigin } = store.getState();
@@ -216,7 +215,11 @@ const UserSelection = memo(
return (
<div
className={cc(['react-flow__pane', 'react-flow__container', { dragging: paneDragging }])}
className={cc([
'react-flow__pane',
'react-flow__container',
{ dragging: paneDragging, selection: isSelectionMode },
])}
{...eventHandlers}
ref={container}
style={containerStyle}
+4
View File
@@ -11,6 +11,10 @@
z-index: 1;
cursor: grab;
&.selection {
cursor: pointer;
}
&.dragging {
cursor: grabbing;
}