From 08f680c07c6a4f949e1be002d57b948a29787841 Mon Sep 17 00:00:00 2001 From: Ruben van de Ven Date: Tue, 21 Dec 2021 15:31:39 +0100 Subject: [PATCH] fix gap in drawing --- www/annotate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/annotate.js b/www/annotate.js index 8255886..3278fd1 100644 --- a/www/annotate.js +++ b/www/annotate.js @@ -91,7 +91,7 @@ class StrokeSlice { constructor(stroke, i_in, i_out) { this.stroke = stroke; // Stroke this.i_in = typeof i_in === 'undefined' ? 0 : i_in; - this.i_out = typeof i_out === 'undefined' ? this.stroke.points.length : i_out; + this.i_out = typeof i_out === 'undefined' ? this.stroke.points.length-1 : i_out; } getSliceId() { @@ -100,7 +100,7 @@ class StrokeSlice { // compatible with Stroke() get points() { - return this.stroke.points.slice(this.i_in, this.i_out); + return this.stroke.points.slice(this.i_in, this.i_out+1); } // compatible with Stroke()