Clean up js coordinate types

This commit is contained in:
Austen Adler 2023-04-22 14:03:02 -04:00
parent dd917558ac
commit 81e1fa58ec
2 changed files with 5 additions and 4 deletions

View File

@ -193,7 +193,7 @@
<TabSelector bind:tabInfo />
{#if tabInfo.selected === 1}
<CoordinateInfo bind:xpin={addr} />
<CoordinateInfo bind:coordinateTypes bind:xpin={addr} />
{/if}
{:catch message}
<Error {message}>Could not start core module</Error>

View File

@ -3,7 +3,8 @@
import { onMount, onDestroy } from 'svelte';
export let xpin;
let formats = ['dd', 'dms', 'dmm', 'utm', 'plus'];
export let coordinateTypes;
let urlFormats = [
'google_maps',
'geo',
@ -54,9 +55,9 @@
</tr>
{/each}
{#each formats as format}
{#each coordinateTypes as format}
<tr class="m-4 border">
<th class="p-4 border">{format.toUpperCase()}</th>
<th class="p-4 border">{format}</th>
<td class="p-4 border">{xpin.allCoordinates[format]}</td>
<td class="p-4 border"><CopyButton data={xpin.allCoordinates[format]} /></td>
</tr>