mirror of
https://github.com/scratchfoundation/Gestouch.git
synced 2024-11-23 07:47:59 -05:00
Touch#time fix (affects SwipeGesture)
This commit is contained in:
parent
0532f4bfbb
commit
09dc1ddfc4
2 changed files with 20 additions and 4 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue