Skip to content

Commit ab2d33c

Browse files
committed
add class to polygon tooltip
1 parent 92d4661 commit ab2d33c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.idea/git_toolbox_prj.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/js/journeymap.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ class Journeymap {
269269
}
270270

271271
return markers
272+
272273
}
273274

274275
_formatText(text) {
@@ -565,7 +566,8 @@ class Journeymap {
565566

566567
coords = coords.concat([coords], holes)
567568
}
568-
569+
let firstPoint = Object.values(polygon.points)
570+
let className = "polygon-" + (translateCoords(firstPoint[0].x, firstPoint[0].z) + "_" + polygon.label).replaceAll(",", "_").replaceAll(":", "_").replaceAll(" ", "_").replaceAll("\n", "").toLowerCase()
569571
polygons.push({
570572
latLngs: coords,
571573

@@ -576,6 +578,7 @@ class Journeymap {
576578
fontColor: polygon.fontColor,
577579
fillColor: polygon.fillColor,
578580
fillOpacity: polygon.fillOpacity,
581+
className: className,
579582
})
580583
}
581584

0 commit comments

Comments
 (0)