Skip to content

Commit

Permalink
idk
Browse files Browse the repository at this point in the history
  • Loading branch information
catherinepan1 committed Dec 1, 2023
1 parent 90bad28 commit 69bd816
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/DrawingPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,14 @@ function DrawingPage() {
if(minInd === -1){
return;
}
if(lastPt === null || sqDist(lastPt.x, lastPt.y, points[minInd].x, points[minInd].y) > threshold * 4 || minDist < 100){
if(lastPt === null){
highlighted.push(points[minInd]);
return;
}
else if(equal(lastPt.x, points[minInd].x) && equal(lastPt.y, points[minInd].y)){
return;
}
else if(sqDist(lastPt.x, lastPt.y, points[minInd].x, points[minInd].y) > threshold || minDist < 100){
highlighted.push(points[minInd]);
}
}
Expand Down

0 comments on commit 69bd816

Please sign in to comment.