mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-17 09:09:30 -07:00
more html
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user