mirror of
https://github.com/konvajs/konva.git
synced 2026-01-23 05:14:58 +08:00
fix drag&drop on mobile
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user