Merge pull request #1043 from paulkaplan/fix-touch-handling

Fix touch actions on the stage
This commit is contained in:
Paul Kaplan authored and GitHub committed 2017-12-19 11:15:30 -05:00
commit 38596c2be1
1 file changed
+1 -1
+1 -1
View File
@@ -195,7 +195,7 @@ class Stage extends React.Component {
this.updateRect();
const {x, y} = getEventXY(e);
const mousePosition = [x - this.rect.left, y - this.rect.top];
if (e.button === 0) {
if (e.button === 0 || e instanceof TouchEvent) {
this.setState({
mouseDown: true,
mouseDownPosition: mousePosition,