remove unneeded calls
This commit is contained in:
parent
574359bd2e
commit
f113b0485f
2 changed files with 3 additions and 8 deletions
|
@ -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() {
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue