Skip to content

Commit

Permalink
add class to polygon tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticdrew committed Jun 20, 2024
1 parent 92d4661 commit 5cb3c1e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/js/journeymap.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ class Journeymap {
}

return markers

}

_formatText(text) {
Expand Down Expand Up @@ -565,7 +566,8 @@ class Journeymap {

coords = coords.concat([coords], holes)
}

let firstPoint = Object.values(polygon.points)
let className = "polygon-" + translateCoords(firstPoint[0].x, firstPoint[0].z) + polygon.label.replaceAll(",", "_").replaceAll(":", "_").replaceAll(" ", "_").replaceAll("\n", "").toLowerCase()
polygons.push({
latLngs: coords,

Expand All @@ -576,6 +578,7 @@ class Journeymap {
fontColor: polygon.fontColor,
fillColor: polygon.fillColor,
fillOpacity: polygon.fillOpacity,
className: className
})
}

Expand Down

0 comments on commit 5cb3c1e

Please sign in to comment.