1
0
Fork 0
mirror of https://github.com/sbrl/Nibriboard.git synced 2018-01-10 21:33:49 +00:00

[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) { handleCanvasMovement(event) {
// Don't bother processing it if it's a mouse / touch interaction and // Don't bother processing it if it's a mouse / touch interaction and
// the control key isn't pressed // 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; return;
// Store the viewport information for later // Store the viewport information for later
this.viewportState = event; this.viewportState = event;

View file

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