Skip to content

Commit a11cb3c

Browse files
author
HarshKhandeparkar
committed
fix: mouse up event doesn't show an error if
no line is drawn
1 parent 3931535 commit a11cb3c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

dist/gpujs-real-renderer-browser.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,8 @@
13031303
_this._mouseUpEventListener = function (e) {
13041304
if (e.button === 0 /* Left Click */) {
13051305
var endCoords = _this._getMouseCoords(e);
1306-
_this._endStroke(endCoords, 'mouse');
1306+
if (_this._lastCoords.has('mouse'))
1307+
_this._endStroke(endCoords, 'mouse');
13071308
_this.canvas.removeEventListener('mousemove', _this._mouseMoveEventListener);
13081309
}
13091310
};

0 commit comments

Comments
 (0)