Build fixed Faktiska production workflow
This commit is contained in:
@@ -10,7 +10,7 @@ import { CityData, drawOnMap } from "./canvasDraw";
|
||||
import { IconInputs } from "../weatherIcons/IconInputs";
|
||||
import { download } from '../../helpers/download'
|
||||
|
||||
export const MapView: Component<{ type: MapResolution, data: () => ResultKeyVal[], mode?: "temperature" | "faktiska" }> = ({ type, data, mode = "temperature" }) => {
|
||||
export const MapView: Component<{ type: MapResolution, data: () => ResultKeyVal[], mode?: "temperature" | "faktiska", productionTemplate?: boolean }> = ({ type, data, mode = "temperature", productionTemplate = false }) => {
|
||||
const [getCanvas, setCanvas] = createSignal<HTMLCanvasElement>();
|
||||
const [getImg, setImg] = createSignal(new Image());
|
||||
const weatherIconsSignal = createSignal<{[key: string]: string;}>({});
|
||||
@@ -28,7 +28,7 @@ export const MapView: Component<{ type: MapResolution, data: () => ResultKeyVal[
|
||||
direction: createSignal(""),
|
||||
speed: createSignal(""),
|
||||
gusts: createSignal(""),
|
||||
roundValues: createSignal(false),
|
||||
roundValues: createSignal(mode === "faktiska"),
|
||||
}
|
||||
|
||||
function getWindData(): [string, string, string, boolean, WindProps] {
|
||||
@@ -93,10 +93,10 @@ export const MapView: Component<{ type: MapResolution, data: () => ResultKeyVal[
|
||||
<details class="broadcastControls" open>
|
||||
<summary><span><strong>Broadcast overlay controls</strong><small>Optional manual wind and weather-symbol overrides</small></span></summary>
|
||||
<p class="controlHelp">These settings do not change the queried city values. Use them only when preparing a finished broadcast graphic.</p>
|
||||
<div class="overlayFields">
|
||||
{!productionTemplate && <div class="overlayFields">
|
||||
<label><span>Title</span><input type="text" placeholder="19. APRĪĻA GAISA TEMPERATŪRAS REKORDI" value={getTitle()} onInput={e => setTitle(e.target.value)} /></label>
|
||||
<label><span>Source</span><input type="text" placeholder="LVĢMC" value={getSource()} onInput={e => setSource(e.target.value)} /></label>
|
||||
</div>
|
||||
</div>}
|
||||
<div class="mapControlSections">
|
||||
<section class="valueControls">
|
||||
<strong>Value and wind settings</strong>
|
||||
|
||||
Reference in New Issue
Block a user