From ed3d84b9748e465e4cddc3f2843d165cd02f280d Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Wed, 24 Feb 2021 00:59:31 +0100 Subject: [PATCH] use the container instead of a (potentially missing) canvas --- htdocs/openwebrx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/openwebrx.js b/htdocs/openwebrx.js index 39c58dc..d7f03bd 100644 --- a/htdocs/openwebrx.js +++ b/htdocs/openwebrx.js @@ -511,7 +511,7 @@ function resize_scale() { } function canvas_get_freq_offset(relativeX) { - var rel = (relativeX / canvases[0].clientWidth); + var rel = (relativeX / canvas_container.clientWidth); return Math.round((bandwidth * rel) - (bandwidth / 2)); }