Skip to content

Commit

Permalink
style tweaks, fixes maproulette#235
Browse files Browse the repository at this point in the history
  • Loading branch information
mvexel committed Dec 10, 2016
1 parent 286fa0a commit 869ed5c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
15 changes: 9 additions & 6 deletions app/assets/javascripts/mapping.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
toastr.options.positionClass = "notification-position";

// Globals

// Max width of marker balloon text
var MAX_BALLOON_TEXT_WIDTH=40;

L.TileLayer.Common = L.TileLayer.extend({
initialize: function (options) {
L.TileLayer.prototype.initialize.call(this, this.url, options);
Expand Down Expand Up @@ -727,18 +732,16 @@ var MRManager = (function() {
counter++;
var v = feature.properties[k];
var printLine = k+": "+v;
if(printLine.length > 22){
popupString += printLine.slice(0,20)+".."+ '<br />';

}
else{
if(printLine.length > MAX_BALLOON_TEXT_WIDTH){
popupString += printLine.slice(0,(MAX_BALLOON_TEXT_WIDTH - 2))+".."+ '<br />';
} else{
popupString += printLine+ '<br />';
}
}
popupString += '</div>';
if (counter > 0) {
layer.bindPopup(popupString, {
maxHeight: 200
maxHeight: 250
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ body, html {
.word-wrap {
overflow-wrap: break-word;
word-wrap: break-word;
}
}
6 changes: 5 additions & 1 deletion app/assets/stylesheets/mapping.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
bottom:50px;
left:50px;
overflow: hidden;
font-family: 'Helvetica', 'Arial', sans-serif;
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 11pt;
}

#map .popup {
font-size:10px;
}

.top-item {
z-index: 99999999999;
}
Expand Down

0 comments on commit 869ed5c

Please sign in to comment.