No need to handle end event, because on touchend no relevant information arrives in the event.

This commit is contained in:
kovacsv 2021-12-12 21:10:17 +01:00
parent a0ef9de5cb
commit a003210666

View File

@ -84,7 +84,7 @@ OV.MouseInteraction = class
return this.buttons[length - 1];
}
GetCoordinates ()
GetPosition ()
{
return this.curr;
}
@ -142,16 +142,6 @@ 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;
@ -454,7 +444,7 @@ OV.Navigation = class
this.mouse.Up (this.canvas, ev);
this.clickDetector.Up (ev);
if (this.clickDetector.IsClick ()) {
let mouseCoords = this.mouse.GetCoordinates ();
let mouseCoords = this.mouse.GetPosition ();
this.Click (ev.which, mouseCoords);
}
}
@ -500,8 +490,6 @@ OV.Navigation = class
OnTouchEnd (ev)
{
ev.preventDefault ();
this.touch.End (this.canvas, ev);
}
OnMouseWheel (ev)