Skip to content

Commit

Permalink
fix: fix oob
Browse files Browse the repository at this point in the history
  • Loading branch information
quanho committed Oct 28, 2024
1 parent 3f3ab72 commit 58e7646
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ const refLineComponent = {
const maxX = scaleX.max();
const minY = scaleY.min();
const maxY = scaleY.max();
slopeLine = { ...p };
slopeLine = { ...p, x1: undefined, y1: undefined, x2: undefined, y2: undefined };
const y1 = minX * p.slope + p.value;
const y2 = maxX * p.slope + p.value;
const x1 = minY / p.slope - p.value / p.slope;
Expand All @@ -313,7 +313,6 @@ const refLineComponent = {
}
intersections = intersections.filter((p) => !!p);
if (intersections.length < 2) {
oob[`x${x1 > maxX ? 1 : 0}`].push(createOobData(p));
oob[`y${y1 > maxY ? 0 : 1}`].push(createOobData(p));
return;
} else {
Expand Down

0 comments on commit 58e7646

Please sign in to comment.