1
0
Fork 0
mirror of https://github.com/sbrl/Nibriboard.git synced 2018-01-10 21:33:49 +00:00

Don't try to erase liesn with less than 2 points

This commit is contained in:
Starbeamrainbowlabs 2017-12-15 14:28:23 +00:00
parent d7c01b725a
commit e1ba8f9a18
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 6 additions and 1 deletions

View file

@ -79,6 +79,11 @@ class Chunk
for (let i = this.lines.length - 1; i >= 0; i--) {
// If our distance to the line is less than half the width (i.e.
// the radius), then we must be inside it
// Skip lines with less than 2 points
// TODO: Handle these separately
if(this.lines[i].Points.length < 2)
continue;
let thisLineDistanceData = point_line_distance_multi(point, this.lines[i].Points);
if(thisLineDistanceData[1] <= this.lines[i].Width / 2)
return this.lines[i];

@ -1 +1 @@
Subproject commit f56620e8cf1ad23a9f24aeeb0b850ef2c749b474
Subproject commit fc8f65e2aff3953e6ca616d26df0d87ba4b4c3d3