diff --git a/src/js/whiteboard.js b/src/js/whiteboard.js index 7956678..f6a82f6 100644 --- a/src/js/whiteboard.js +++ b/src/js/whiteboard.js @@ -296,7 +296,7 @@ const whiteboard = { currentPos.x - _this.viewCoords.x, currentPos.y - _this.viewCoords.y, _this.startCoords.x - _this.viewCoords.x, - _this.startCoords.y - _this.viewCoords.y + _this.startCoords.y - _this.viewCoords.y, ], c: _this.drawcolor, th: _this.thickness, @@ -336,7 +336,7 @@ const whiteboard = { _this.startCoords.x - _this.viewCoords.x, _this.startCoords.y - _this.viewCoords.y, currentPos.x - _this.viewCoords.x, - currentPos.y - _this.viewCoords.y + currentPos.y - _this.viewCoords.y, ], c: _this.drawcolor, th: _this.thickness, @@ -353,7 +353,11 @@ const whiteboard = { ); _this.sendFunction({ t: _this.tool, - d: [_this.startCoords.x - _this.viewCoords.x, _this.startCoords.y - _this.viewCoords.y, r], + d: [ + _this.startCoords.x - _this.viewCoords.x, + _this.startCoords.y - _this.viewCoords.y, + r, + ], c: _this.drawcolor, th: _this.thickness, }); @@ -536,7 +540,7 @@ const whiteboard = { currentPos.x - _this.viewCoords.x, currentPos.y - _this.viewCoords.y, _this.prevPos.x - _this.viewCoords.x, - _this.prevPos.y - _this.viewCoords.y + _this.prevPos.y - _this.viewCoords.y, ], th: _this.thickness, }); @@ -988,13 +992,13 @@ const whiteboard = { // TODO: Fix canvas shrink on textbox move out of the bounderies // Rect goes out not able to remove from screen with a kind of left > +_this.canvas.width ? -9999 : left + _this.viewCoords.x - console.log(_this.viewCoords) - console.log(this.canvas) - left = left + _this.viewCoords.x + console.log(_this.viewCoords); + console.log(this.canvas); + left = left + _this.viewCoords.x; top = top + _this.viewCoords.y; - console.log(left) - console.log(+_this.canvas.width) - + console.log(left); + console.log(+_this.canvas.width); + let editable = _this.tool == "text" || _this.tool === "stickynote" ? "true" : "false"; var textBox = $( '