From a6d4577c465fd14a9ba22738600afab0fa49109d Mon Sep 17 00:00:00 2001 From: Lorenzo Date: Thu, 16 Apr 2020 02:18:38 +0200 Subject: [PATCH] cleaned up code (work in progress) --- public/js/whiteboard.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/public/js/whiteboard.js b/public/js/whiteboard.js index 486014a..b9a2120 100644 --- a/public/js/whiteboard.js +++ b/public/js/whiteboard.js @@ -214,7 +214,6 @@ var whiteboard = { return; } - //console.info("eoff: " + e.offsetY); console.info("else:" + (e.pageY - $(e.target).offset().top)); _this.sendFunction({ "t": "cursor", "event": "move", @@ -250,8 +249,6 @@ var whiteboard = { _this.ctx.globalCompositeOperation = _this.oldGCO; var currX = (loc.offsetX || loc.pageX - $(e.target).offset().left); var currY = (loc.offsetY || loc.pageY - $(e.target).offset().top); - var els = loc.pageY - $(e.target).offset().top; - console.info("eoff: " + loc.offsetY); console.info("else: " + els); if (!currX || !currY) { currX = _this.latestTouchCoods[0]; currY = _this.latestTouchCoods[1]; @@ -430,19 +427,7 @@ var whiteboard = { var currX = loc.offsetX || loc.pageX - $(e.target).offset().left; var currY = loc.offsetY || loc.pageY - $(e.target).offset().top; - /*console.log("curr y:" + loc.currY); - console.log("offset y:" + loc.offsetY); - console.log("page y:" + loc.pageY); - - console.log("current y: " + currY);*/ - window.requestAnimationFrame(function () { - if ((!currX || !currY) && e.touches && e.touches[0]) { - var touche = e.touches[0]; - currX = touche.clientX - $(_this.mouseOverlay).offset().left; - currY = touche.clientY - $(_this.mouseOverlay).offset().top; - //console.log("current y new: " + currY); - } _this.latestTouchCoods = [currX, currY]; if (_this.drawFlag) {