Document Faktiska production contract

This commit is contained in:
b0txec
2026-08-19 17:23:07 +03:00
parent e726291bdb
commit 01115936f5
6 changed files with 60 additions and 31 deletions
+8 -1
View File
@@ -84,7 +84,14 @@ export const MapView: Component<{ type: MapResolution, data: () => ResultKeyVal[
}
function downloadPng() {
getCanvas()!.toBlob(blob => blob && download(blob, `weather-${type}.png`), 'image/png')
const canvas = getCanvas()!;
if (productionTemplate && (canvas.width !== 3840 || canvas.height !== 1440)) {
console.error(`Faktiskā export blocked: expected 3840 × 1440, received ${canvas.width} × ${canvas.height}`);
return;
}
const filename = productionTemplate ? "faktiska-3840x1440.png" : `weather-${type}.png`;
canvas.toBlob(blob => blob && download(blob, filename), 'image/png')
}
return (