diff --git a/src/sidebar/RoutingResults.tsx b/src/sidebar/RoutingResults.tsx index 6a0bad7f..5ff54050 100644 --- a/src/sidebar/RoutingResults.tsx +++ b/src/sidebar/RoutingResults.tsx @@ -522,19 +522,19 @@ function downloadGPX(path: Path, showDistanceInMiles: boolean) { tmpElement.download = fileName tmpElement.click() // URL.revokeObjectURL(tmpElement.href) - } else { // window.showSaveFilePicker is only supported from Chrome (and createWritable is not supported from Safari) // Also used for CapacitorJS where it is overwritten in src/app.js - window.showSaveFilePicker({ + window + .showSaveFilePicker({ suggestedName: fileName, types: [ { description: 'GPX/XML Files', - accept: { [mimeType]: ['.gpx'],}, + accept: { [mimeType]: ['.gpx'] }, }, ], - fileContents: xmlString, /* not part of the Chrome API, but necessary for CapacitorJS */ + fileContents: xmlString /* not part of the Chrome API, but necessary for CapacitorJS */, }) .then((fileHandle: any) => { return fileHandle.createWritable() diff --git a/src/sidebar/SettingsBox.tsx b/src/sidebar/SettingsBox.tsx index df5c67cb..5301f973 100644 --- a/src/sidebar/SettingsBox.tsx +++ b/src/sidebar/SettingsBox.tsx @@ -20,8 +20,8 @@ export default function SettingsBox({ turnNavSettings }: { turnNavSettings: TNSe className={styles.copyLinkRow} onClick={() => { let url = window.location.href - if(window.location.href.startsWith("http://localhost")) - url = "https://navi.graphhopper.org" + window.location.pathname + window.location.search + if (window.location.href.startsWith('http://localhost')) + url = 'https://navi.graphhopper.org' + window.location.pathname + window.location.search navigator.clipboard.writeText(url) if (navigator.share) navigator.share({ url: url }) setShowCopiedInfo(true) diff --git a/src/stores/MapActionReceiver.ts b/src/stores/MapActionReceiver.ts index 579d047f..9af4e758 100644 --- a/src/stores/MapActionReceiver.ts +++ b/src/stores/MapActionReceiver.ts @@ -75,7 +75,7 @@ export default class MapActionReceiver implements ActionReceiver { const mapView = this.map.getView() const size = this.map.getSize() // [width, height] // move anchor of rotation a bit down but if not too much if width is too small and current location would be under bottom panel - mapView.padding = [size ? size[1] * 2 / 3 : 50, 0, size && size[0] > 1200 ? 0 : 100, 0] + mapView.padding = [size ? (size[1] * 2) / 3 : 50, 0, size && size[0] > 1200 ? 0 : 100, 0] mapView.cancelAnimations() // if location updates are sent too fast animations might stack up const center = fromLonLat([action.coordinate.lng, action.coordinate.lat]) diff --git a/src/turnNavigation/TurnNavigation.module.css b/src/turnNavigation/TurnNavigation.module.css index 6586d242..84817832 100644 --- a/src/turnNavigation/TurnNavigation.module.css +++ b/src/turnNavigation/TurnNavigation.module.css @@ -139,7 +139,6 @@ } .maxSpeed { - } .secondCol { @@ -192,10 +191,10 @@ z-index: 2; } - /* dynamic font sizes with vw or similar are not that nice to tune and to test */ @media (max-width: 430px) { - .turnSign, .instructionText { + .turnSign, + .instructionText { font-size: medium; } diff --git a/src/turnNavigation/TurnNavigation.tsx b/src/turnNavigation/TurnNavigation.tsx index 5580b430..61ef16fb 100644 --- a/src/turnNavigation/TurnNavigation.tsx +++ b/src/turnNavigation/TurnNavigation.tsx @@ -123,9 +123,7 @@ export default function ({ turnNavigation }: { turnNavigation: TurnNavigationSto
setShowTime(!showTime)}> {showTime ? ( <> -
- {arrivalDate.getHours() + ':' + (min > 9 ? min : '0' + min)} -
+
{arrivalDate.getHours() + ':' + (min > 9 ? min : '0' + min)}