use the container instead of a (potentially missing) canvas

This commit is contained in:
Jakob Ketterl 2021-02-24 00:59:31 +01:00
parent 710a18aae3
commit ed3d84b974

View File

@ -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));
}