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 {
this.updateRect();
const {x, y} = getEventXY(e);
const mousePosition = [x - this.rect.left, y - this.rect.top];
this.setState({
mouseDown: true,
mouseDownPosition: mousePosition,
mouseDownTimeoutId: setTimeout(
this.onStartDrag.bind(this, mousePosition[0], mousePosition[1]),
500
)
});
if (e.button === 0) {
this.setState({
mouseDown: true,
mouseDownPosition: mousePosition,
mouseDownTimeoutId: setTimeout(
this.onStartDrag.bind(this, mousePosition[0], mousePosition[1]),
500
)
});
}
const data = {
isDown: true,
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