Skip to content

Commit efba4a9

Browse files
committed
add polygon name
1 parent da2ca77 commit efba4a9

File tree

4 files changed

+63
-12
lines changed

4 files changed

+63
-12
lines changed

.github/workflows/manual_publish.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: manual_publish
2+
3+
on: workflow_dispatch
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- uses: actions/checkout@v1
10+
11+
- name: Java Set-Up
12+
uses: actions/setup-java@v2
13+
14+
with:
15+
distribution: "adopt"
16+
java-version: "8"
17+
18+
- name: Set up secrets
19+
run: 'echo "$NPM_AUTH" >> ~/.npmrc'
20+
21+
env:
22+
NPM_AUTH: ${{secrets.NPM_AUTH}}
23+
24+
- name: NodeJS Set-Up
25+
uses: actions/setup-node@v2
26+
with:
27+
node-version: "16"
28+
cache: 'yarn'
29+
30+
- name: Yarn install
31+
run: yarn install
32+
33+
- name: Gradle Build
34+
run: /bin/sh ./gradlew build
35+
36+
- name: Gradle Publish
37+
run: /bin/sh ./gradlew -Pjourneymap.user=${{ secrets.JOURNEYMAP_USER }} -Pjourneymap.password=${{ secrets.JOURNEYMAP_PASSWORD }} publish

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
release=1.0-SNAPSHOT
1+
release=1.0.1-SNAPSHOT

src/main/js/journeymap.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,8 @@ class Journeymap {
572572
strokeColor: polygon.strokeColor,
573573
strokeOpacity: polygon.strokeOpacity,
574574
strokeWidth: polygon.strokeWidth,
575-
575+
label: polygon.label,
576+
fontColor: polygon.fontColor,
576577
fillColor: polygon.fillColor,
577578
fillOpacity: polygon.fillOpacity,
578579
})

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

+23-10
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.fontColor }};
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>
@@ -207,7 +215,12 @@
207215

208216
v-if="visiblePolygons"
209217
v-for="(polygon) in polygons"
210-
></l-polygon>
218+
219+
>
220+
<l-tooltip :options="{permanent: true, direction: 'center', offset: [0, 43], className: polygon.className}">
221+
{{ polygon.label }}
222+
</l-tooltip>
223+
</l-polygon>
211224
</l-map>
212225

213226
<b-collapse :open.sync="settingsVisible"

0 commit comments

Comments
 (0)