fix: restore upstream master changes
This commit is contained in:
parent
dde88ae2fb
commit
3dd889b800
@ -114,11 +114,9 @@ function main() {
|
|||||||
tempLineTool = true;
|
tempLineTool = true;
|
||||||
whiteboard.ownCursor.hide();
|
whiteboard.ownCursor.hide();
|
||||||
if (whiteboard.drawFlag) {
|
if (whiteboard.drawFlag) {
|
||||||
whiteboard.mouseup({ offsetX: whiteboard.currX, offsetY: whiteboard.currY })
|
whiteboard.mouseup({ offsetX: whiteboard.prevPos.x, offsetY: whiteboard.prevPos.y })
|
||||||
shortcutFunctions.setTool_line();
|
shortcutFunctions.setTool_line();
|
||||||
whiteboard.prevX = whiteboard.currX;
|
whiteboard.mousedown({ offsetX: whiteboard.prevPos.x, offsetY: whiteboard.prevPos.y })
|
||||||
whiteboard.prevY = whiteboard.currY;
|
|
||||||
whiteboard.mousedown({ offsetX: whiteboard.currX, offsetY: whiteboard.currY })
|
|
||||||
} else {
|
} else {
|
||||||
shortcutFunctions.setTool_line();
|
shortcutFunctions.setTool_line();
|
||||||
}
|
}
|
||||||
|
@ -212,9 +212,9 @@ const whiteboard = {
|
|||||||
_this.sendFunction({ "t": _this.tool, "d": [currentPos.x, currentPos.y, _this.startCoords.x, _this.startCoords.y], "c": _this.drawcolor, "th": _this.thickness });
|
_this.sendFunction({ "t": _this.tool, "d": [currentPos.x, currentPos.y, _this.startCoords.x, _this.startCoords.y], "c": _this.drawcolor, "th": _this.thickness });
|
||||||
_this.svgContainer.find("line").remove();
|
_this.svgContainer.find("line").remove();
|
||||||
} else if (_this.tool === "pen") {
|
} else if (_this.tool === "pen") {
|
||||||
_this.drawId--;
|
_this.drawId--;
|
||||||
_this.pushPointSmoothPen(currentPos.x, currentPos.y);
|
_this.pushPointSmoothPen(currentPos.x, currentPos.y);
|
||||||
_this.drawId++;
|
_this.drawId++;
|
||||||
} else if (_this.tool === "rect") {
|
} else if (_this.tool === "rect") {
|
||||||
if (_this.pressedKeys.shift) {
|
if (_this.pressedKeys.shift) {
|
||||||
if ((currentPos.x - _this.startCoords.x) * (currentPos.y - _this.startCoords.y) > 0) {
|
if ((currentPos.x - _this.startCoords.x) * (currentPos.y - _this.startCoords.y) > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user