Merge pull request #127 from Narapureddy-Srikanth/bug_drawing
fixed drawing bug as per #113
This commit is contained in:
commit
172ca62dca
@ -238,7 +238,6 @@ const whiteboard = {
|
|||||||
}
|
}
|
||||||
if (ReadOnlyService.readOnlyActive) return;
|
if (ReadOnlyService.readOnlyActive) return;
|
||||||
_this.drawFlag = false;
|
_this.drawFlag = false;
|
||||||
_this.drawId++;
|
|
||||||
_this.ctx.globalCompositeOperation = _this.oldGCO;
|
_this.ctx.globalCompositeOperation = _this.oldGCO;
|
||||||
|
|
||||||
let currentPos = Point.fromEvent(e);
|
let currentPos = Point.fromEvent(e);
|
||||||
@ -271,9 +270,7 @@ const whiteboard = {
|
|||||||
});
|
});
|
||||||
_this.svgContainer.find("line").remove();
|
_this.svgContainer.find("line").remove();
|
||||||
} else if (_this.tool === "pen") {
|
} else if (_this.tool === "pen") {
|
||||||
_this.drawId--;
|
|
||||||
_this.pushPointSmoothPen(currentPos.x, currentPos.y);
|
_this.pushPointSmoothPen(currentPos.x, currentPos.y);
|
||||||
_this.drawId++;
|
|
||||||
} else if (_this.tool === "rect") {
|
} else if (_this.tool === "rect") {
|
||||||
if (_this.pressedKeys.shift) {
|
if (_this.pressedKeys.shift) {
|
||||||
if (
|
if (
|
||||||
@ -407,6 +404,7 @@ const whiteboard = {
|
|||||||
imgDiv.draggable();
|
imgDiv.draggable();
|
||||||
_this.svgContainer.find("rect").remove();
|
_this.svgContainer.find("rect").remove();
|
||||||
}
|
}
|
||||||
|
_this.drawId++;
|
||||||
};
|
};
|
||||||
|
|
||||||
_this.mouseOverlay.on("mouseout", function (e) {
|
_this.mouseOverlay.on("mouseout", function (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user