1
0
Fork 0

[client] contains -> includes

This commit is contained in:
Starbeamrainbowlabs 2017-04-16 16:51:52 +01:00
parent a89608e36f
commit 3cb7c1576f
2 changed files with 4 additions and 4 deletions

View File

@ -236,7 +236,7 @@ class BoardWindow extends EventEmitter
handleCanvasMovement(event) {
// Don't bother processing it if it's a mouse / touch interaction and
// the control key isn't pressed
if([ "mouse", "touch" ].contains(event.type) && !this.DownKeys.contains(17))
if([ "mouse", "touch" ].includes(event.type) && !this.keyboard.DownKeys.includes(17))
return;
// Store the viewport information for later
this.viewportState = event;

View File

@ -55,7 +55,7 @@ class Pencil
// todo add zoom support here
// Don't draw anything if the left mouse button isn't down
if(!this.boardWindow.mouse.leftDown)
if(!this.mouse.leftDown)
return;
var nextPoint = new Vector(
@ -66,11 +66,11 @@ class Pencil
this.currentLineSegments.push(nextPoint);
if(new Date() - this.lastServerPush > this.pushDelay)
sendUnsent();
this.sendUnsent();
}
handleMouseUp(event) {
sendUnsent();
this.sendUnsent();
// Tell the server that the line is complete
this.rippleLink.send({
Event: "LineComplete",