more html

This commit is contained in:
Matt Walsh 2022-07-29 16:12:42 -05:00
commit f26fce1e58
22 changed files with 1305 additions and 372 deletions

View file

@ -94,8 +94,10 @@ class Progress extends WeatherDisplay {
}
canvasClick(e) {
const x = e.offsetX;
const y = e.offsetY;
// un-scale
const scale = e.target.getBoundingClientRect().width / e.target.width;
const x = e.offsetX / scale;
const y = e.offsetY / scale;
// eliminate off canvas and outside area clicks
if (!this.isActive()) return;
if (y < 100 || y > 410) return;