remove unneeded calls

This commit is contained in:
hippoz 2021-11-08 17:02:05 +02:00
parent 574359bd2e
commit f113b0485f
No known key found for this signature in database
GPG key ID: 7C52899193467641
2 changed files with 3 additions and 8 deletions

View file

@ -43,15 +43,15 @@ class Connection {
sendMessage(code, params=[]) { sendMessage(code, params=[]) {
let message = code; let message = code;
params.forEach((param, i) => { for (let i = 0; i < params.length; i++) {
const param = params[i];
if (i == params.length - 1) if (i == params.length - 1)
message += param; message += param;
else else
message += param + ";"; message += param + ";";
}); }
this.ws.send(message); this.ws.send(message);
return message;
} }
disconnect() { disconnect() {

View file

@ -84,7 +84,6 @@ class TouchpadController {
onTouchMove(event) { onTouchMove(event) {
const touches = event.changedTouches; const touches = event.changedTouches;
event.preventDefault(); event.preventDefault();
event.stopPropagation();
const targetTouch = touches[0]; const targetTouch = touches[0];
@ -133,8 +132,6 @@ class TouchpadController {
onTouchEnd(event) { onTouchEnd(event) {
const changedTouches = event.changedTouches; const changedTouches = event.changedTouches;
event.preventDefault();
event.stopPropagation();
this.shouldResetLastMove = true; this.shouldResetLastMove = true;
if (changedTouches.length === 1) { if (changedTouches.length === 1) {
@ -160,8 +157,6 @@ class TouchpadController {
onTouchStart(event) { onTouchStart(event) {
const changedTouches = event.changedTouches; const changedTouches = event.changedTouches;
event.preventDefault();
event.stopPropagation();
// Clear the hold mode time out if another touch begins // Clear the hold mode time out if another touch begins
if (this.holdModeTimeout) if (this.holdModeTimeout)