End event should handled for iOS.

This commit is contained in:
kovacsv 2021-12-12 21:36:41 +01:00
parent ce57dff028
commit 712b75e208

View File

@ -133,6 +133,7 @@ OV.TouchInteraction = class
if (ev.touches.length === 0) {
return;
}
this.currPos = this.GetPositionFromEvent (canvas, ev);
this.diffPos = OV.SubCoord2D (this.currPos, this.prevPos);
this.prevPos = this.currPos.Clone ();
@ -142,6 +143,17 @@ OV.TouchInteraction = class
this.prevDist = this.currDist;
}
End (canvas, ev)
{
if (ev.touches.length === 0) {
return;
}
this.fingers = 0;
this.currPos = this.GetPositionFromEvent (canvas, ev);
this.currDist = this.GetTouchDistanceFromEvent (canvas, ev);
}
IsFingerDown ()
{
return this.fingers !== 0;
@ -481,6 +493,8 @@ OV.Navigation = class
OnTouchEnd (ev)
{
ev.preventDefault ();
this.touch.End (this.canvas, ev);
}
OnMouseWheel (ev)