mirror of
https://github.com/konvajs/konva.git
synced 2025-09-19 10:47:59 +08:00
drag and drop logic now works correctly on mobile when both the stage is draggable and a shape
This commit is contained in:
@@ -462,11 +462,9 @@
|
||||
},
|
||||
_touchstart: function(evt) {
|
||||
this._setPointerPosition(evt);
|
||||
var dd = Kinetic.DD,
|
||||
go = Kinetic.Global,
|
||||
var go = Kinetic.Global,
|
||||
obj = this.getIntersection(this.getPointerPosition()),
|
||||
shape;
|
||||
|
||||
|
||||
evt.preventDefault();
|
||||
|
||||
@@ -477,8 +475,8 @@
|
||||
shape._handleEvent(TOUCHSTART, evt);
|
||||
}
|
||||
|
||||
// init stage drag and drop
|
||||
if(dd && !go.isDragging() && this.isDraggable()) {
|
||||
//init stage drag and drop
|
||||
if(this.isDraggable() && !go.isDragReady()) {
|
||||
this.startDrag(evt);
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user