Skip to content

Commit

Permalink
Use grab and grabbing mouse cursors
Browse files Browse the repository at this point in the history
  • Loading branch information
gregfagan committed Oct 11, 2015
1 parent a15da3e commit c459e99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/js/components/draggable-path.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export class DragPath extends React.Component {

render() {
const { path, isDragging, connectDragSource, style, children, ...other } = this.props;
const hideWhileDraggingStyle = { opacity: isDragging ? 0 : 1, ...style };
const hideWhileDraggingStyle = {
opacity: isDragging ? 0 : 1,
cursor: 'grab; cursor: -webkit-grab',
...style
};
const childProps = { style: hideWhileDraggingStyle, ...other};
return connectDragSource(cloneElement(children, childProps));
}
Expand Down
2 changes: 1 addition & 1 deletion app/js/components/draglayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ export default class CardDragLayer extends React.Component {
const layerStyles = {
transformStyle: 'preserve-3d',
position: 'absolute',
pointerEvents: 'none',
zIndex: 100,
left: 0,
top: 0,
cursor: 'grabbing; cursor: -webkit-grabbing',
};

function getItemStyles(props, state) {
Expand Down

0 comments on commit c459e99

Please sign in to comment.