diff --git a/plugins/linear-genome-view/src/LinearGenomeView/components/LinearGenomeView.tsx b/plugins/linear-genome-view/src/LinearGenomeView/components/LinearGenomeView.tsx
index d4f520a0e98..48b5d36e9b2 100644
--- a/plugins/linear-genome-view/src/LinearGenomeView/components/LinearGenomeView.tsx
+++ b/plugins/linear-genome-view/src/LinearGenomeView/components/LinearGenomeView.tsx
@@ -93,18 +93,17 @@ const LinearGenomeView = observer(({ model }: { model: LGV }) => {
session.setHovered(undefined)}
onMouseMove={event => {
const c = ref.current
if (!c) {
return
}
- const hoverPosition = model.pxToBp(
- event.clientX - c.getBoundingClientRect().left,
- )
- const hoverFeature = model.tracks.find(
- t => t.displays[0].featureUnderMouse,
- )
- session.setHovered({ hoverPosition, hoverFeature })
+ const { tracks } = model
+ const leftPx = event.clientX - c.getBoundingClientRect().left
+ const hoverPosition = model.pxToBp(leftPx)
+ const hoverFeature = tracks.find(t => t.displays[0].featureUnderMouse)
+ session.setHovered({ hoverPosition, hoverFeature, leftPx })
}}
>