Skip to content
Snippets Groups Projects
Commit fa40d549 authored by Karishma Chadha's avatar Karishma Chadha
Browse files

onMouseUp should tell the vm that the mouse is up even if a drag just ended.

parent f24fe802
No related branches found
No related tags found
No related merge requests found
...@@ -188,16 +188,15 @@ class Stage extends React.Component { ...@@ -188,16 +188,15 @@ class Stage extends React.Component {
}); });
if (this.state.isDragging) { if (this.state.isDragging) {
this.onStopDrag(); this.onStopDrag();
} else {
const data = {
isDown: false,
x: x - this.rect.left,
y: y - this.rect.top,
canvasWidth: this.rect.width,
canvasHeight: this.rect.height
};
this.props.vm.postIOData('mouse', data);
} }
const data = {
isDown: false,
x: x - this.rect.left,
y: y - this.rect.top,
canvasWidth: this.rect.width,
canvasHeight: this.rect.height
};
this.props.vm.postIOData('mouse', data);
} }
onMouseDown (e) { onMouseDown (e) {
this.updateRect(); this.updateRect();
......
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