Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed Aug 6, 2023
1 parent 510cf90 commit c405ed4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/sidebar/RoutingResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/sidebar/SettingsBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/stores/MapActionReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
5 changes: 2 additions & 3 deletions src/turnNavigation/TurnNavigation.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@
}

.maxSpeed {

}

.secondCol {
Expand Down Expand Up @@ -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;
}

Expand Down
4 changes: 1 addition & 3 deletions src/turnNavigation/TurnNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ export default function ({ turnNavigation }: { turnNavigation: TurnNavigationSto
<div onClick={() => setShowTime(!showTime)}>
{showTime ? (
<>
<div>
{arrivalDate.getHours() + ':' + (min > 9 ? min : '0' + min)}
</div>
<div>{arrivalDate.getHours() + ':' + (min > 9 ? min : '0' + min)}</div>
<svg width="30" height="8">
<circle cx="5" cy="4" r="3" />
<circle cx="20" cy="4" r="3.5" stroke="black" fill="white" />
Expand Down

0 comments on commit c405ed4

Please sign in to comment.