From 0caf050103c7a98563ecd9a0aa023b8fef53a78b Mon Sep 17 00:00:00 2001 From: Adam Nickle Date: Wed, 1 Jan 2020 02:04:35 -0600 Subject: [PATCH] Improve document dragging. --- src/components/DrawField/index.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/components/DrawField/index.tsx b/src/components/DrawField/index.tsx index f48682f..a90ab19 100644 --- a/src/components/DrawField/index.tsx +++ b/src/components/DrawField/index.tsx @@ -617,16 +617,6 @@ class DrawField extends React.Component } } } - 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 ) { @@ -878,7 +868,8 @@ class DrawField extends React.Component { 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 );