Increase font and box sizes for large maps

This commit is contained in:
Guntis Smaukstelis
2024-02-09 21:42:55 +02:00
parent 336dbe5596
commit 46b16e462e
2 changed files with 8 additions and 8 deletions
+2 -4
View File
@@ -8,8 +8,6 @@ export function drawOnMap(
windData: [string, string, string, boolean, WindProps],
props: ResolutionPropsValue,
): void {
const boxSize = 80;
const [windDirection, windSpeed, windGusts, roundValues, windProp] = windData;
const [bgImg, arrowImg] = imgArr;
@@ -24,13 +22,13 @@ export function drawOnMap(
ctx.beginPath();
ctx.fillStyle = "#FFFFFF";
ctx.rect(localX-boxSize/2, localY-boxSize/2, boxSize, boxSize);
ctx.rect(localX-props.boxSize/2, localY-props.boxSize/2, props.boxSize, props.boxSize);
ctx.fill();
});
ctx.fill();
// weather values
ctx.font = "bold 30px Rubik";
ctx.font = `bold ${props.fontSize}px Rubik`;
ctx.textAlign = "center";
ctx.textBaseline = "middle";
coords.forEach(([, {x, y}, value]) => {