1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 10:39:25 +02:00

Make sure touch events arrive in correct order.

This commit is contained in:
Simo Kinnunen 2014-04-03 17:13:17 +09:00
parent ceeda2b990
commit c33f0eab09
6 changed files with 68 additions and 22 deletions

View file

@ -15,6 +15,7 @@ module.exports = function DeviceScreenDirective($document, ScalingService) {
, cachedDisplayHeight = 0
, loading = false
, scaler
, seq = 0
function sendTouch(type, e) {
var scaled = scaler.coords(
@ -28,7 +29,8 @@ module.exports = function DeviceScreenDirective($document, ScalingService) {
'translate3d(' + e.offsetX + 'px,' + e.offsetY + 'px,0)'
scope.control[type](
scaled.xP * scope.device.display.width
seq++
, scaled.xP * scope.device.display.width
, scaled.yP * scope.device.display.height
)
}
@ -38,6 +40,7 @@ module.exports = function DeviceScreenDirective($document, ScalingService) {
element.unbind('mousemove', moveListener)
$document.unbind('mouseup', upListener)
$document.unbind('mouseleave', upListener)
seq = 0
}
function updateDisplaySize() {