Skip to content
Snippets Groups Projects
Commit 7e033818 authored by Jake Bartles's avatar Jake Bartles
Browse files

fixed issue #701 which was causing sprite to be dragged with a right click.

parent 79689da9
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.which === 1) {
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