|
121 | 121 | </template> |
122 | 122 | </v-tooltip> |
123 | 123 | <!-- POI Edge Arrows --> |
124 | | - <template v-if="mapReady"> |
| 124 | + <template v-if="mapReady && widget.options.showPoiArrows"> |
125 | 125 | <div v-for="arrow in poiEdgeArrows" :key="arrow.poiId" class="poi-edge-arrow" :style="arrow.style"> |
126 | 126 | <v-tooltip location="top" :text="arrow.tooltipText" content-class="poi-arrow-tooltip"> |
127 | 127 | <template #activator="{ props: tooltipProps }"> |
|
136 | 136 | </div> |
137 | 137 | </template> |
138 | 138 | <!-- Vehicle Edge Arrow --> |
139 | | - <template v-if="mapReady"> |
| 139 | + <template v-if="mapReady && vehicleEdgeArrow"> |
140 | 140 | <div class="poi-edge-arrow" :style="vehicleEdgeArrow.style"> |
141 | 141 | <v-tooltip location="top" :text="vehicleEdgeArrow.tooltipText" content-class="poi-arrow-tooltip"> |
142 | 142 | <template #activator="{ props: tooltipProps }"> |
|
155 | 155 | </div> |
156 | 156 | </template> |
157 | 157 | <!-- Home Edge Arrow --> |
158 | | - <template v-if="mapReady"> |
| 158 | + <template v-if="mapReady && homeEdgeArrow"> |
159 | 159 | <div class="poi-edge-arrow" :style="homeEdgeArrow.style"> |
160 | 160 | <v-tooltip location="top" :text="homeEdgeArrow.tooltipText" content-class="poi-arrow-tooltip"> |
161 | 161 | <template #activator="{ props: tooltipProps }"> |
|
186 | 186 | </ContextMenu> |
187 | 187 |
|
188 | 188 | <v-dialog v-model="widgetStore.widgetManagerVars(widget.hash).configMenuOpen" width="auto"> |
189 | | - <v-card class="pa-2" :style="interfaceStore.globalGlassMenuStyles"> |
190 | | - <v-card-title class="text-center">Map widget settings</v-card-title> |
191 | | - <v-card-text> |
192 | | - <v-switch |
193 | | - v-model="widget.options.showVehiclePath" |
194 | | - class="my-1" |
195 | | - label="Show vehicle path" |
196 | | - :color="widget.options.showVehiclePath ? 'white' : undefined" |
197 | | - hide-details |
198 | | - /> |
199 | | - <v-switch |
200 | | - v-model="widget.options.showCoordinateGrid" |
201 | | - class="my-1" |
202 | | - label="Show coordinate grid" |
203 | | - :color="widget.options.showCoordinateGrid ? 'white' : undefined" |
204 | | - hide-details |
| 189 | + <v-card class="pa-2 max-w-[800px]" :style="interfaceStore.globalGlassMenuStyles"> |
| 190 | + <v-card-title class="flex justify-between items-center"> |
| 191 | + <span class="text-center flex-1">Map widget settings</span> |
| 192 | + <v-btn |
| 193 | + icon="mdi-close" |
| 194 | + size="small" |
| 195 | + variant="text" |
| 196 | + class="absolute right-2 top-2 text-lg" |
| 197 | + @click="widgetStore.widgetManagerVars(widget.hash).configMenuOpen = false" |
205 | 198 | /> |
| 199 | + </v-card-title> |
| 200 | + <v-card-text> |
| 201 | + <ExpansiblePanel compact :is-expanded="!interfaceStore.isOnSmallScreen" no-bottom-divider no-top-divider> |
| 202 | + <template #title>Display</template> |
| 203 | + <template #content> |
| 204 | + <v-row> |
| 205 | + <v-col cols="4"> |
| 206 | + <v-switch |
| 207 | + v-model="widget.options.showVehiclePath" |
| 208 | + class="my-1" |
| 209 | + label="Vehicle path" |
| 210 | + :color="widget.options.showVehiclePath ? 'white' : undefined" |
| 211 | + hide-details |
| 212 | + /> |
| 213 | + </v-col> |
| 214 | + <v-col cols="4"> |
| 215 | + <v-switch |
| 216 | + v-model="widget.options.showCoordinateGrid" |
| 217 | + class="my-1" |
| 218 | + label="Coordinate grid" |
| 219 | + :color="widget.options.showCoordinateGrid ? 'white' : undefined" |
| 220 | + hide-details |
| 221 | + /> |
| 222 | + </v-col> |
| 223 | + <v-col cols="4"> |
| 224 | + <v-switch |
| 225 | + v-model="widget.options.showPoiArrows" |
| 226 | + class="my-1" |
| 227 | + label="Point of Interest arrows" |
| 228 | + :color="widget.options.showPoiArrows ? 'white' : undefined" |
| 229 | + hide-details |
| 230 | + /> |
| 231 | + </v-col> |
| 232 | + <v-col cols="4"> |
| 233 | + <v-switch |
| 234 | + v-model="widget.options.showHomeArrow" |
| 235 | + class="my-1" |
| 236 | + label="Home arrow" |
| 237 | + :color="widget.options.showHomeArrow ? 'white' : undefined" |
| 238 | + hide-details |
| 239 | + /> |
| 240 | + </v-col> |
| 241 | + <v-col cols="4"> |
| 242 | + <v-switch |
| 243 | + v-model="widget.options.showVehicleArrow" |
| 244 | + class="my-1" |
| 245 | + label="Vehicle arrow" |
| 246 | + :color="widget.options.showVehicleArrow ? 'white' : undefined" |
| 247 | + hide-details |
| 248 | + /> |
| 249 | + </v-col> |
| 250 | + </v-row> |
| 251 | + </template> |
| 252 | + </ExpansiblePanel> |
206 | 253 | </v-card-text> |
| 254 | + <v-divider class="mx-10" /> |
| 255 | + <v-card-actions class="flex justify-end pt-3"> |
| 256 | + <v-btn @click="widgetStore.widgetManagerVars(widget.hash).configMenuOpen = false">Close</v-btn> |
| 257 | + </v-card-actions> |
207 | 258 | </v-card> |
208 | 259 | </v-dialog> |
209 | 260 |
|
@@ -273,6 +324,7 @@ import copterMarkerImage from '@/assets/arducopter-top-view.png' |
273 | 324 | import blueboatMarkerImage from '@/assets/blueboat-marker.png' |
274 | 325 | import brov2MarkerImage from '@/assets/brov2-marker.png' |
275 | 326 | import genericVehicleMarkerImage from '@/assets/generic-vehicle-marker.png' |
| 327 | +import ExpansiblePanel from '@/components/ExpansiblePanel.vue' |
276 | 328 | import GlobalOriginDialog from '@/components/GlobalOriginDialog.vue' |
277 | 329 | import MissionChecklist from '@/components/MissionChecklist.vue' |
278 | 330 | import PoiManager from '@/components/poi/PoiManager.vue' |
@@ -487,12 +539,24 @@ onBeforeMount(() => { |
487 | 539 | widget.value.options = { |
488 | 540 | showVehiclePath: true, |
489 | 541 | showCoordinateGrid: false, |
| 542 | + showPoiArrows: true, |
| 543 | + showHomeArrow: true, |
| 544 | + showVehicleArrow: true, |
490 | 545 | } |
491 | 546 | } |
492 | 547 | // Ensure new options exist for existing widgets |
493 | 548 | if (widget.value.options.showCoordinateGrid === undefined) { |
494 | 549 | widget.value.options.showCoordinateGrid = false |
495 | 550 | } |
| 551 | + if (widget.value.options.showPoiArrows === undefined) { |
| 552 | + widget.value.options.showPoiArrows = true |
| 553 | + } |
| 554 | + if (widget.value.options.showHomeArrow === undefined) { |
| 555 | + widget.value.options.showHomeArrow = true |
| 556 | + } |
| 557 | + if (widget.value.options.showVehicleArrow === undefined) { |
| 558 | + widget.value.options.showVehicleArrow = true |
| 559 | + } |
496 | 560 | targetFollower.enableAutoUpdate() |
497 | 561 | }) |
498 | 562 |
|
|
0 commit comments