format properly

This commit is contained in:
Simon 2023-02-08 11:24:24 +01:00 committed by SimonFJ20
parent 288fd1f7c7
commit 19e75f9647

View File

@ -31,9 +31,9 @@ function displayMousePosition(element: HTMLParagraphElement, mouse: Position) {
}
function displayCoords(element: HTMLParagraphElement, coords: Coordinate) {
element.innerHTML = `Coords: <code>${coords.longitude.toFixed(
3,
)}, ${coords.latitude.toFixed(3)}</code>`;
const longitude = coords.longitude.toFixed(3);
const latitude = coords.latitude.toFixed(3);
element.innerHTML = `Coords: <code>${longitude}, ${latitude}</code>`;
}
function displayZipCode(