Skip to content

Commit

Permalink
fix: show fixed no of digits in location coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchamahabal committed Apr 3, 2024
1 parent 66259a6 commit ad5407e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/components/CheckInPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ function success(position) {
latitude.value = position.coords.latitude
longitude.value = position.coords.longitude

locationStatus.value = `Latitude: ${latitude.value} °, Longitude: ${longitude.value} °`
locationStatus.value = `
Latitude: ${Number(latitude.value).toFixed(5)} °,
Longitude: ${Number(longitude.value).toFixed(5)} °
`
}

function error() {
Expand Down

0 comments on commit ad5407e

Please sign in to comment.