fix gap in drawing

This commit is contained in:
Ruben van de Ven 2021-12-21 15:31:39 +01:00
parent 31963968cc
commit 08f680c07c

View file

@ -91,7 +91,7 @@ class StrokeSlice {
constructor(stroke, i_in, i_out) { constructor(stroke, i_in, i_out) {
this.stroke = stroke; // Stroke this.stroke = stroke; // Stroke
this.i_in = typeof i_in === 'undefined' ? 0 : i_in; 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() { getSliceId() {
@ -100,7 +100,7 @@ class StrokeSlice {
// compatible with Stroke() // compatible with Stroke()
get points() { 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() // compatible with Stroke()