Document Faktiska production contract
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user