Skip to content

Commit

Permalink
Improve document dragging.
Browse files Browse the repository at this point in the history
  • Loading branch information
anickle060193 committed Jan 1, 2020
1 parent 741365d commit 0caf050
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/components/DrawField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -617,16 +617,6 @@ class DrawField extends React.Component<Props, State>
}
}
}
else if( this.props.tool === Tool.Cursor )
{
this.moved = true;

this.setState( { dragging: true } );

let originX = this.props.originX + e.movementX;
let originY = this.props.originY + e.movementY;
this.props.setOrigin( { originX, originY } );
}

if( this.moved )
{
Expand Down Expand Up @@ -878,7 +868,8 @@ class DrawField extends React.Component<Props, State>
{
if( e.evt.button === 0 )
{
if( this.props.tool === Tool.Cursor )
if( this.props.tool === Tool.Cursor
&& !this.state.ctrlDown )
{
this.props.selectDrawing( drawing.id );

Expand Down

0 comments on commit 0caf050

Please sign in to comment.