Added Splash Screens for PWA

This commit is contained in:
2026-07-09 11:12:37 +10:00
parent 4f3b7bd839
commit d765161b9a
5 changed files with 11 additions and 6 deletions
@@ -269,6 +269,10 @@ export default defineComponent({
showLegend: {
type: Boolean,
default: true,
},
compact: {
type: Boolean,
default: false,
}
},
@@ -649,8 +653,9 @@ export default defineComponent({
// ── Fit bounds ────────────────────────────────────────────────────────
const fitBounds = (padding = 60): void => {
const fitBounds = (): void => {
if (!props.flights.length) return
const padding = props.compact ? 25 : 60
const lngs = props.flights.flatMap(f => [f.departure_airport.longitude_deg, f.arrival_airport.longitude_deg])
const lats = props.flights.flatMap(f => [f.departure_airport.latitude_deg, f.arrival_airport.latitude_deg])
@@ -673,7 +678,6 @@ export default defineComponent({
minLng = Math.min(...lngs)
maxLng = Math.max(...lngs)
}
map!.fitBounds([[minLng, minLat], [maxLng, maxLat]], { padding, duration: 0 })
}