Skip to content

Commit 896c37a

Browse files
committed
polygon label formatting
1 parent 303e84f commit 896c37a

File tree

1 file changed

+18
-10
lines changed
  • src/main/resources/assets/journeymap/web

1 file changed

+18
-10
lines changed

src/main/resources/assets/journeymap/web/index.html

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,26 @@
2121
<div id="main">
2222
<v-style v-if="visibleWaypoints">
2323
<template v-for="(waypoint) in waypoints">
24-
.leaflet-tooltip.{{waypoint.className}} {
25-
color: {{waypoint.tooltipColor}};
26-
border-color: {{waypoint.tooltipColor}};
27-
}
24+
.leaflet-tooltip.{{ waypoint.className }} {
25+
color: {{ waypoint.tooltipColor }};
26+
border-color: {{ waypoint.tooltipColor }};
27+
}
28+
</template>
29+
</v-style>
30+
<v-style v-if="visiblePolygons">
31+
<template v-for="(polygon) in polygons">
32+
.leaflet-tooltip.{{ polygon.className }} {
33+
color: {{ polygon.fillColor }};
34+
border-color: {{ polygon.strokeColor }};
35+
}
2836
</template>
2937
</v-style>
30-
3138
<v-style v-if="visibleAnimals || visibleMobs || visibleVillagers">
3239
<template v-for="(marker) in markers">
3340
<template v-if="marker.color !== undefined">
34-
.leaflet-tooltip.{{ marker.key.replaceAll("/", "_") }} {
35-
border-color: {{ marker.color }};
36-
}
41+
.leaflet-tooltip.{{ marker.key.replaceAll("/", "_") }} {
42+
border-color: {{ marker.color }};
43+
}
3744
</template>
3845
</template>
3946
</v-style>
@@ -182,7 +189,8 @@
182189
v-if="visibleWaypoints"
183190
v-for="(waypoint) in waypoints"
184191
>
185-
<l-tooltip :options="{permanent: true, direction: 'center', offset: [0, 43], className: waypoint.className}">
192+
<l-tooltip
193+
:options="{permanent: true, direction: 'center', offset: [0, 43], className: waypoint.className}">
186194
{{ waypoint.name }}
187195
</l-tooltip>
188196
</l-marker>
@@ -209,7 +217,7 @@
209217
v-for="(polygon) in polygons"
210218

211219
>
212-
<l-tooltip :options="{permanent: true, direction: 'center', offset: [0, 43], className: 'TEST ME OUT'}">
220+
<l-tooltip :options="{permanent: true, direction: 'center', offset: [0, 43], className: polygon.className}">
213221
{{ polygon.label }}
214222
</l-tooltip>
215223
</l-polygon>

0 commit comments

Comments
 (0)