From 39301d9367465b434b5a697876f078299a7c7d6a Mon Sep 17 00:00:00 2001 From: abakkk Date: Fri, 8 Mar 2019 13:04:45 +0100 Subject: [PATCH] fix commit 743d8d7644b5c70c09225b3a7e9cf33d4bdba29e Problems with "free drawing" when the brushstroke is very very fast --- draw.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/draw.js b/draw.js index cb86da6..7d81452 100644 --- a/draw.js +++ b/draw.js @@ -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) {