From 9e211d700ae238483452bc4f948b30476612bec9 Mon Sep 17 00:00:00 2001 From: Jean-Benoist Leger Date: Fri, 17 Apr 2020 15:53:53 +0000 Subject: [PATCH] The last point of a line should be added with the same drawID as the rest of the line. --- public/js/whiteboard.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/js/whiteboard.js b/public/js/whiteboard.js index 4a2fe50..f3a36e2 100644 --- a/public/js/whiteboard.js +++ b/public/js/whiteboard.js @@ -180,7 +180,9 @@ var whiteboard = { _this.sendFunction({ "t": _this.tool, "d": [currX, currY, _this.startCoords[0], _this.startCoords[1]], "c": _this.drawcolor, "th": _this.thickness }); _this.svgContainer.find("line").remove(); } else if (_this.tool === "pen") { + _this.drawId--; _this.pushPointSmoothPen(currX, currY); + _this.drawId++; } else if (_this.tool === "rect") { if (_this.pressedKeys.shift) { if ((currY - _this.startCoords[1]) * (currX - _this.startCoords[0]) > 0) {