Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Fix touch input #4

Merged
merged 1 commit into from
Jun 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions SignallingWebServer/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2017,6 +2017,8 @@ function registerTouchEvents(playerElement) {

function forgetTouch(touch) {
fingers.push(fingerIds[touch.identifier]);
// Sort array back into descending order. This means if finger '1' were to lift after finger '0', we would ensure that 0 will be the first index to pop
fingers.sort(function(a, b){return b - a});
delete fingerIds[touch.identifier];
}

Expand Down