mirror of
https://github.com/konvajs/konva.git
synced 2026-01-23 13:26:07 +08:00
drag&drop multitouch
This commit is contained in:
@@ -243,6 +243,9 @@ afterEach(function() {
|
||||
Konva.stages.forEach(function(stage) {
|
||||
stage.destroy();
|
||||
});
|
||||
if (Konva.DD._dragElements.size) {
|
||||
throw 'Why not cleaned?';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -300,10 +303,11 @@ Konva.Stage.prototype.simulateTouchStart = function(pos, changed) {
|
||||
clientY: touch.y + top
|
||||
}));
|
||||
} else {
|
||||
touches = [
|
||||
changedTouches = touches = [
|
||||
{
|
||||
clientX: pos.x,
|
||||
clientY: pos.y + top
|
||||
clientY: pos.y + top,
|
||||
id: 0
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -332,10 +336,11 @@ Konva.Stage.prototype.simulateTouchMove = function(pos, changed) {
|
||||
clientY: touch.y + top
|
||||
}));
|
||||
} else {
|
||||
touches = [
|
||||
changedTouches = touches = [
|
||||
{
|
||||
clientX: pos.x,
|
||||
clientY: pos.y + top
|
||||
clientY: pos.y + top,
|
||||
id: 0
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -365,10 +370,11 @@ Konva.Stage.prototype.simulateTouchEnd = function(pos, changed) {
|
||||
clientY: touch.y + top
|
||||
}));
|
||||
} else {
|
||||
touches = [
|
||||
changedTouches = touches = [
|
||||
{
|
||||
clientX: pos.x,
|
||||
clientY: pos.y + top
|
||||
clientY: pos.y + top,
|
||||
id: 0
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user