From fa40d549551d19d871c439460b50b1ae051d280f Mon Sep 17 00:00:00 2001 From: Karishma Chadha <kchadha@scratch.mit.edu> Date: Wed, 28 Feb 2018 15:29:36 -0500 Subject: [PATCH] onMouseUp should tell the vm that the mouse is up even if a drag just ended. --- src/containers/stage.jsx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/containers/stage.jsx b/src/containers/stage.jsx index c386112b3..8687923e5 100644 --- a/src/containers/stage.jsx +++ b/src/containers/stage.jsx @@ -188,16 +188,15 @@ class Stage extends React.Component { }); if (this.state.isDragging) { 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) { this.updateRect(); -- GitLab