Problems with "free drawing" when the brushstroke is very very fast
This commit is contained in:
abakkk 2019-03-08 13:04:45 +01:00
parent 3ebcec5a68
commit 39301d9367
1 changed files with 3 additions and 2 deletions

View File

@ -257,9 +257,10 @@ var DrawingArea = new Lang.Class({
this.buttonReleasedHandler = null;
}
// skip when the size is too small to be visible (3px)
// skip when the size is too small to be visible (3px) (except for free drawing)
if (this.currentElement && this.currentElement.points.length >= 2 &&
Math.hypot(this.currentElement.points[1][0] - this.currentElement.points[0][0], this.currentElement.points[1][1] - this.currentElement.points[0][1]) > 3) {
(this.currentShape == Shapes.NONE ||
Math.hypot(this.currentElement.points[1][0] - this.currentElement.points[0][0], this.currentElement.points[1][1] - this.currentElement.points[0][1]) > 3)) {
// start writing
if (this.currentShape == Shapes.TEXT) {