Update template/module/map.pug
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
sora-ext 2025-02-27 17:32:59 +01:00
parent 1f3db375a4
commit 50a98b9a31

View File

@ -1,6 +1,7 @@
l-map(
:zoom.sync="journey.data.main[idx].map.zoom",
:center.sync="journey.data.main[idx].map.center",
:zoom.sync="journey.leg_get().map.zoom",
:center.sync="journey.leg_get().map.center",
style="padding-top: 100%"
ref="map"
)
@ -9,6 +10,12 @@ l-map(
attribution="© <a href=\"http://osm.org/copyright\">OpenStreetMap</a> contributors"
)
l-control-scale(position="topright", :imperial="false", :metric="true")
l-marker(
v-if="map_override.active",
:lat-lng="map_override.center"
)
l-icon(v-html="generate_marker('plus', 'darkgreen')")
l-marker(
v-if="journey.data.main[idx].hotel",
:lat-lng="journey.data.main[idx].hotel.latlon"
@ -17,8 +24,8 @@ l-map(
l-popup
h1.row.text-medium.text-center {{ journey.data.main[idx].hotel.sname }}
span.row.text-small.text-gray {{ journey.data.main[idx].hotel.display_name }}
span(v-if="journey_edit")
.row.input
span(v-if="edit_active")
.row.input(style="margin-bottom:0;")
textarea-autosize.col-12.col-sm-12.text-small(
placeholder="Notes",
v-model="journey.data.main[idx].hotel.notes",
@ -39,12 +46,12 @@ l-map(
v-else-if="place.step == -1 || place.step == undefined",
v-html="generate_marker(place, 'gray')"
)
l-icon(v-else-if="journey_edit", v-html="generate_marker(place, 'lightgray')")
l-icon(v-else-if="edit_active", v-html="generate_marker(place, 'lightgray')")
l-icon(v-else)
l-popup
h1.row.text-medium.text-center {{ place.sname }}
span.row.text-small.text-gray {{ place.display_name }}
span(v-if="journey_edit")
span(v-if="edit_active")
.row.input
textarea-autosize.col-12.col-sm-12.text-small(
placeholder="Notes",
@ -72,7 +79,7 @@ l-map(
l-popup
h1.row.text-medium.text-center {{ place.sname }}
span.row.text-small.text-gray {{ place.display_name }}
span(v-if="journey_edit")
span(v-if="edit_active")
.row.input
textarea-autosize.col-12.col-sm-12.text-small(
placeholder="Notes"
@ -82,11 +89,11 @@ l-map(
)
span.row.text-small.text-dark(v-else) {{ place.notes }}
div(v-for= "latlngs in polyline.latlngs")
l-polyline(:lat-lngs="polyline.latlngs" :color="polyline.color")
div(v-for= "travel in journey.data.main[idx].travel")
l-polyline(:lat-lngs="travel.path" :color="travel.color || 'gray'")
l-marker(
v-for="(place, index) in latlngs"
v-for="(place, index) in travel.path"
:key="'plane'+index"
:lat-lng="place"
)
l-icon(v-html="generate_icon('plane', polyline.color, generate_rotation(index,latlngs))")
l-icon(v-html="generate_icon('plane', travel.color || 'gray', generate_rotation(index,travel.path))")