Skip to content

Commit

Permalink
Use two pixel tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans5958 committed Jul 21, 2023
1 parent 40c4c3c commit cec0103
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/_js/main/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ function getOutOfBounds() {
checkedRefPeriods.push(refPeriod)
const [ refX1, refY1, refX2, refY2 ] = refRegion
for (const point of path) {
const isOutOfBounds = !pointIsInPolygon(point, [[refX1 - 1, refY1 - 1], [refX2 + 1, refY1 - 1], [refX2 + 1, refY2 + 1], [refX1 - 1, refY2 + 1]])
const isOutOfBounds = !pointIsInPolygon(point, [[refX1 - 2, refY1 - 2], [refX2 + 2, refY1 - 2], [refX2 + 2, refY2 + 2], [refX1 - 2, refY2 + 2]])
if (!isOutOfBounds) continue
outOfBounds[i] = true
continue pathCheck
Expand Down

0 comments on commit cec0103

Please sign in to comment.