drag&drop multitouch

This commit is contained in:
Anton Lavrenov
2019-08-04 14:38:57 +07:00
parent 1d932bf76c
commit 34f0f4ae33
17 changed files with 1923 additions and 595 deletions

View File

@@ -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
}
];
}