Skip to content

Commit

Permalink
Shorten layer_title in popups
Browse files Browse the repository at this point in the history
  • Loading branch information
ut committed Jan 7, 2025
1 parent 06fa969 commit c6111c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/assets/javascripts/helpers/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ function PopupFullContent(place) {
}
content += '<div class="leaflet-popup-content-text">';

content += "<p class='label' style='background-color: "+place.layer_color+"; color: #444;'>" + place.layer_title + "</p>";
var layer_title = place.layer_title;
if (layer_title.length > 30) {
layer_title = layer_title.substring(0, 30) + "...";
}
content += "<p class='label' style='background-color: "+place.layer_color+"; color: #444;'>" + layer_title + "</p>";
if (place.date_with_qualifier) {
content += "<p>" + place.date_with_qualifier;
if (place.address) {
Expand Down

0 comments on commit c6111c9

Please sign in to comment.