Skip to content
Snippets Groups Projects
Commit 0c5810ee authored by Paul Kaplan's avatar Paul Kaplan Committed by GitHub
Browse files

Merge pull request #717 from bartljak/issue-#701

Fixed issue causing right click to drag sprite. 
parents 3dc4c706 24377200
No related branches found
No related tags found
No related merge requests found
...@@ -179,14 +179,16 @@ class Stage extends React.Component { ...@@ -179,14 +179,16 @@ class Stage extends React.Component {
this.updateRect(); this.updateRect();
const {x, y} = getEventXY(e); const {x, y} = getEventXY(e);
const mousePosition = [x - this.rect.left, y - this.rect.top]; const mousePosition = [x - this.rect.left, y - this.rect.top];
this.setState({ if (e.button === 0) {
mouseDown: true, this.setState({
mouseDownPosition: mousePosition, mouseDown: true,
mouseDownTimeoutId: setTimeout( mouseDownPosition: mousePosition,
this.onStartDrag.bind(this, mousePosition[0], mousePosition[1]), mouseDownTimeoutId: setTimeout(
500 this.onStartDrag.bind(this, mousePosition[0], mousePosition[1]),
) 500
}); )
});
}
const data = { const data = {
isDown: true, isDown: true,
x: mousePosition[0], x: mousePosition[0],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment