Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronPlave committed Dec 19, 2023
1 parent e30a7df commit 2e66eda
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/timeline/LayerLine.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,11 @@
}
});
// Try out arrows on interpolate so that arrows are on left and right points
let mouseOverPoints: LinePoint[] = [];
// TODO clean this up
if (leftPoint) {
if (!interpolateHoverValue) {
if (!interpolateHoverValue && leftPoint.y !== null) {
const closestPoint = getClosestPointForXY((leftPoint as LinePoint).x, y, points, yScale);
if (closestPoint) {
leftPoint = closestPoint;
Expand All @@ -287,8 +288,8 @@
mouseOverPoints.push(leftPoint);
}
if (rightPoint) {
if (!interpolateHoverValue) {
const closestPoint = getClosestPointForXY((leftPoint as LinePoint).x, y, points, yScale);
if (!interpolateHoverValue && rightPoint.y !== null) {
const closestPoint = getClosestPointForXY((rightPoint as LinePoint).x, y, points, yScale);
if (closestPoint) {
rightPoint = closestPoint;
}
Expand Down

0 comments on commit 2e66eda

Please sign in to comment.