From d14b7b2b1fdfef15f7d05a7c1b856a940595d7de Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sat, 25 Mar 2023 22:54:14 -0400 Subject: [PATCH] Allow copying of different formats --- web-frontend/src/lib/CopyButton.svelte | 42 +++++++++++++++++++ .../src/routes/app/CoordinateInfo.svelte | 30 +++++++------ 2 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 web-frontend/src/lib/CopyButton.svelte diff --git a/web-frontend/src/lib/CopyButton.svelte b/web-frontend/src/lib/CopyButton.svelte new file mode 100644 index 0000000..4def6d9 --- /dev/null +++ b/web-frontend/src/lib/CopyButton.svelte @@ -0,0 +1,42 @@ + + + diff --git a/web-frontend/src/routes/app/CoordinateInfo.svelte b/web-frontend/src/routes/app/CoordinateInfo.svelte index 62f4ec0..04c2b1a 100644 --- a/web-frontend/src/routes/app/CoordinateInfo.svelte +++ b/web-frontend/src/routes/app/CoordinateInfo.svelte @@ -1,24 +1,28 @@ -

DD

-

{xpin.allCoordinates.dd}

+ + + + + -

DMS

-

{xpin.allCoordinates.dms}

- -

DMM

-

{xpin.allCoordinates.dmm}

- -

UTM

-

{xpin.allCoordinates.utm}

- -

PLUS

-

{xpin.allCoordinates.plus}

+ {#each formats as format} + + + + + + {/each} +
FormatValue +
{format.toUpperCase()}{xpin.allCoordinates[format]}