Skip to content

Commit

Permalink
Coordinate input type selection
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Sep 5, 2024
1 parent 3e0edff commit 90691fc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
12 changes: 11 additions & 1 deletion api/web/src/components/CloudTAK/CoordInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
:modes='["dd"]'
@submit='submitPoint'
/>
<Div class='d-flex justify-content-center'>
<CoordinateType
class='pt-3'
:size='24'
v-model='type'
/>
</div>
<button
class='btn btn-primary w-100 mt-3'
@click='submitPoint'
Expand All @@ -32,6 +39,7 @@

<script>
import Coordinate from './util/Coordinate.vue';
import CoordinateType from './util/CoordinateType.vue';
import {
TablerInput,
} from '@tak-ps/vue-tabler';
Expand All @@ -44,6 +52,7 @@ export default {
name: 'CoordInput',
components: {
TablerInput,
CoordinateType,
Coordinate
},
emits: [
Expand All @@ -54,6 +63,7 @@ export default {
return {
name: '',
type: 'u-d-p',
coordinates: [
Math.round(center.lng * 1000000) / 1000000,
Math.round(center.lat * 1000000) / 1000000,
Expand All @@ -65,7 +75,7 @@ export default {
await cotStore.add({
type: 'Feature',
properties: {
type: 'u-d-p',
type: this.type,
how: 'h-g-i-g-o',
color: '#00FF00',
archived: true,
Expand Down
22 changes: 13 additions & 9 deletions api/web/src/components/CloudTAK/util/CoordinateType.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class='btn'
><IconPoint
title='Point Icon'
:size='40'
:size='size'
:stroke='1'
/></label>

Expand All @@ -38,8 +38,8 @@
type='button'
class='btn'
><img
width='40'
height='40'
:width='size'
:height='size'
src='/pngs/a-u-G.png'
></label>

Expand All @@ -58,8 +58,8 @@
type='button'
class='btn'
><img
width='40'
height='40'
:width='size'
:height='size'
src='/pngs/a-f-G.png'
></label>

Expand All @@ -78,8 +78,8 @@
type='button'
class='btn'
><img
width='40'
height='40'
:width='size'
:height='size'
src='/pngs/a-h-G.png'
></label>

Expand All @@ -98,8 +98,8 @@
type='button'
class='btn'
><img
width='40'
height='40'
:width='size'
:height='size'
src='/pngs/a-n-G.png'
></label>
</div>
Expand All @@ -115,6 +115,10 @@ export default {
modelValue: {
type: String,
required: true,
},
size: {
type: Number,
default: 40
}
},
emits: [
Expand Down

0 comments on commit 90691fc

Please sign in to comment.