The last point of a line should be added with the same drawID as the rest of the line.

This commit is contained in:
Jean-Benoist Leger 2020-04-17 15:53:53 +00:00
parent 5098263d34
commit 9e211d700a
1 changed files with 2 additions and 0 deletions

View File

@ -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) {