Merge pull request #4347 from rgk/patch-5

On mobile, have pointerup and pointerout get triggered together.
This commit is contained in:
Richard Davey 2019-02-10 21:17:24 +00:00 committed by GitHub
commit 3104246386
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1489,6 +1489,14 @@ var InputPlugin = new Class({
gameObject.emit(Events.GAMEOBJECT_POINTER_UP, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);
// Clear over and emit 'pointerout' on touch.
if (pointer.wasTouch)
{
this._over[pointer.id] = [];
gameObject.emit(Events.GAMEOBJECT_POINTER_OUT, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);
}
if (_eventData.cancelled)
{
aborted = true;