Skip to content

Commit

Permalink
Cleaned up some code that wasn't fully reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
cohansen committed Nov 29, 2023
1 parent 1fc9a84 commit 46fa344
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/timeline/LayerXRange.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
});
async function draw(): Promise<void> {
if (ctx !== null && xScaleView) {
if (ctx && xScaleView) {
await tick();
ctx.resetTransform();
Expand Down Expand Up @@ -211,9 +211,8 @@
function onMousemove(e: MouseEvent | undefined): void {
if (e) {
const { offsetX: x, offsetY: y } = e;
let points = searchQuadtreeRect<XRangePoint>(quadtree, x, y, drawHeight, maxXWidth, visiblePointsById);
const points = searchQuadtreeRect<XRangePoint>(quadtree, x, y, drawHeight, maxXWidth, visiblePointsById);
// The user will only hover one part of the layer at a time so only dispatch the set of points they're hovering.
dispatch('mouseOver', { e, layerId: id, points });
}
}
Expand Down

0 comments on commit 46fa344

Please sign in to comment.