Skip to content

Commit

Permalink
Locked Radial
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Dec 11, 2024
1 parent c0e4e4c commit e1c05c2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/web/src/components/CloudTAK/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
<IconLockAccess
v-else-if='!mapStore.radial.cot'
role='button'
color='#83b7e8'
tabindex='0'
title='Map is locked to marker'
:size='40'
Expand Down Expand Up @@ -864,6 +865,9 @@ async function handleRadial(event: string): Promise<void> {
await cotStore.delete(String(cot.id))
await updateCOT();
} else if (event === 'cot:lock') {
locked.value.push(mapStore.radial.cot.properties ? mapStore.radial.cot.properties.id : mapStore.radial.cot.id);
closeRadial()
} else if (event === 'cot:edit') {
editGeometry(mapStore.radial.cot.properties ? mapStore.radial.cot.properties.id : mapStore.radial.cot.id);
closeRadial()
Expand Down
21 changes: 21 additions & 0 deletions api/web/src/components/CloudTAK/RadialMenu/RadialMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@
id='icons'
class='d-none'
>
<symbol
id='radial-lock'
viewBox='0 0 24 24'
fill='none'
width='24'
height='24'
stroke='#fff'
stroke-width='2'
stroke-linejoin='round'
stroke-linecap='round'
>
<path d='M12.5 21h-5.5a2 2 0 0 1 -2 -2v-6a2 2 0 0 1 2 -2h10c.24 0 .47 .042 .683 .12' />
<path d='M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0' />
<path d='M8 11v-4a4 4 0 1 1 8 0v4' />
<path d='M21.121 20.121a3 3 0 1 0 -4.242 0c.418 .419 1.125 1.045 2.121 1.879c1.051 -.89 1.759 -1.516 2.121 -1.879z' />
<path d='M19 18v.01' />
</symbol>
<symbol
id='radial-question'
viewBox='0 0 24 24'
Expand Down Expand Up @@ -154,6 +171,10 @@ export default {
if (cot.origin.mode === OriginMode.CONNECTION) {
this.menuItems.push({ id: 'edit', icon: '#radial-pencil' })
this.menuItems.push({ id: 'delete', icon: '#radial-trash' })
if (cot.geometry.type === 'Point') {
this.menuItems.push({ id: 'lock', icon: '#radial-lock' })
}
} else if (cot.origin.mode === OriginMode.MISSION && cot.origin.mode_id) {
const sub = cotStore.subscriptions.get(cot.origin.mode_id);
Expand Down

0 comments on commit e1c05c2

Please sign in to comment.