From 4b86ec3eaa5a201abfe782dba1109d720d7399a2 Mon Sep 17 00:00:00 2001 From: Lorenzo Date: Wed, 15 Apr 2020 20:59:35 +0200 Subject: [PATCH] test multi touch --- public/js/whiteboard.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/js/whiteboard.js b/public/js/whiteboard.js index 4a2fe50..d324a58 100644 --- a/public/js/whiteboard.js +++ b/public/js/whiteboard.js @@ -87,6 +87,10 @@ var whiteboard = { return; } + if(e.touches.length > 1) { + return; // if more than one fingers are touching the screen, dont draw + } + _this.drawFlag = true; _this.prevX = (e.offsetX || e.pageX - $(e.target).offset().left) + 1; _this.prevY = (e.offsetY || e.pageY - $(e.target).offset().top) + 1;