generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/dave 180 versetzen der messstelle (#57)
* neuer Tab zur Verschiebung der Messstelle * refactor * fix readonly Messstellen * fix zindex
- Loading branch information
1 parent
6fe9769
commit 5f9ecae
Showing
5 changed files
with
177 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<template> | ||
<v-sheet | ||
width="100%" | ||
:min-height="height" | ||
:max-height="height" | ||
class="overflow-y-auto" | ||
> | ||
<v-card elevation="0"> | ||
<v-card-text> | ||
<mini-map | ||
:coords="coords" | ||
:height="heightMap" | ||
width="100%" | ||
:is-messstelle="true" | ||
:show-attribution="true" | ||
:reset-marker="resetMarker" | ||
:draggable="draggable" | ||
@updateZaehlstellenCoords="updateZaehlstellenCoords" | ||
/> | ||
</v-card-text> | ||
</v-card> | ||
</v-sheet> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import MiniMap from "@/components/map/MiniMap.vue"; | ||
import { LatLng } from "leaflet"; | ||
import MessstelleEditDTO from "@/domain/dto/messstelle/MessstelleEditDTO"; | ||
import { computed, ComputedRef } from "vue"; | ||
import DefaultObjectCreator from "@/util/DefaultObjectCreator"; | ||
interface Props { | ||
height: string; | ||
heightMap: string; | ||
resetMarker: boolean; | ||
draggable: boolean; | ||
value: MessstelleEditDTO; | ||
} | ||
const props = defineProps<Props>(); | ||
const emits = defineEmits<{ | ||
(e: "input", v: MessstelleEditDTO): void; | ||
}>(); | ||
const editMessstelle = computed({ | ||
get: () => props.value, | ||
set: (v) => emits("input", v), | ||
}); | ||
const coords: ComputedRef<LatLng> = computed(() => { | ||
let coords = DefaultObjectCreator.createCenterOfMunichLatLng(); | ||
if (editMessstelle.value.latitude && editMessstelle.value.longitude) { | ||
return new LatLng( | ||
editMessstelle.value.latitude, | ||
editMessstelle.value.longitude | ||
); | ||
} | ||
return coords; | ||
}); | ||
function updateZaehlstellenCoords(newCoords: LatLng): void { | ||
editMessstelle.value.latitude = newCoords.lat; | ||
editMessstelle.value.longitude = newCoords.lng; | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters