switch from css zoom to transform-scale

This commit is contained in:
Matt Walsh
2023-05-31 22:57:36 -05:00
parent 3b050073ed
commit 2c010a9a32
6 changed files with 11 additions and 9 deletions

View File

@@ -167,9 +167,7 @@ class RegionalForecast extends WeatherDisplay {
// draw the map
const scale = 640 / (offsetXY.x * 2);
const map = this.elem.querySelector('.map');
map.style.zoom = scale;
map.style.top = `-${sourceXY.y}px`;
map.style.left = `-${sourceXY.x}px`;
map.style.transform = `scale(${scale}) translate(-${sourceXY.x}px, -${sourceXY.y}px)`;
const cities = data.map((city) => {
const fill = {};