fix drag&drop on mobile

This commit is contained in:
Anton Lavrenov
2019-02-27 09:14:07 -05:00
parent a62ce96214
commit 0d9a27f185
7 changed files with 1412 additions and 53 deletions

View File

@@ -2207,7 +2207,10 @@ export abstract class Node {
this._dragCleanup();
this.on('mousedown.konva touchstart.konva', function(evt) {
var canDrag = _getGlobalKonva().dragButtons.indexOf(evt.evt.button) >= 0;
var shouldCheckButton = evt.evt.button !== undefined;
var canDrag =
!shouldCheckButton ||
_getGlobalKonva().dragButtons.indexOf(evt.evt.button) >= 0;
if (!canDrag) {
return;
}