Touch#time fix (affects SwipeGesture)

This commit is contained in:
Pavel fljot 2012-02-21 20:14:13 +02:00
parent 0532f4bfbb
commit 09dc1ddfc4
2 changed files with 20 additions and 4 deletions

View file

@ -85,7 +85,7 @@ package org.gestouch.input
var touch:Touch = _touchesManager.getTouch(PRIMARY_TOUCH_POINT_ID);
touch.x = event.stageX;
touch.y = event.stageY;
//TODO: time update vs begin time
touch.time = getTimer();
_gesturesManager.gestouch_internal::onTouchMove(touch);
}
@ -106,7 +106,7 @@ package org.gestouch.input
var touch:Touch = _touchesManager.getTouch(PRIMARY_TOUCH_POINT_ID);
touch.x = event.stageX;
touch.y = event.stageY;
//TODO: time update vs begin time
touch.time = getTimer();
_gesturesManager.gestouch_internal::onTouchEnd(touch);

View file

@ -105,7 +105,15 @@ package org.gestouch.input
touch.sizeX = event.sizeX;
touch.sizeY = event.sizeY;
touch.pressure = event.pressure;
//TODO: time update vs begin time
//TODO: conditional compilation?
if (event.hasOwnProperty("timestamp"))
{
touch.time = event["timestamp"];
}
else
{
touch.time = getTimer();
}
_gesturesManager.gestouch_internal::onTouchMove(touch);
}
@ -128,7 +136,15 @@ package org.gestouch.input
touch.sizeX = event.sizeX;
touch.sizeY = event.sizeY;
touch.pressure = event.pressure;
//TODO: time update vs begin time
//TODO: conditional compilation?
if (event.hasOwnProperty("timestamp"))
{
touch.time = event["timestamp"];
}
else
{
touch.time = getTimer();
}
_gesturesManager.gestouch_internal::onTouchEnd(touch);