From 5a5fe1e38aa9d43abcd51c328107b75533e33e36 Mon Sep 17 00:00:00 2001 From: Anton Sarukhanov <code@ant.sr> Date: Thu, 7 Apr 2016 20:06:32 -0400 Subject: [PATCH] js clarity --- static/js/map.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/map.js b/static/js/map.js index e3ac8a2..e48570b 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -143,7 +143,7 @@ BusMap.Map = function(opts) { var route = that.routes[vehicles[v].route].title; var text = '<header>' + route + '</header>'; - var text_after = '<footer>Bus # ' + vehicles[v].vehicle + '</footer>'; + var footer = '<footer>Bus # ' + vehicles[v].vehicle + '</footer>'; var popupOpts = { closeButton: false, keepInView: true, @@ -161,7 +161,7 @@ BusMap.Map = function(opts) { noHide: true, direction: 'right', clickable: true, - }).bindPopup(text + text_after, popupOpts).addTo(that.vehicleMarkersGroup); + }).bindPopup(text + footer, popupOpts).addTo(that.vehicleMarkersGroup); } else { that.vehicleMarkers[v].setLatLng([vehicles[v].lat, vehicles[v].lon]) .setIconAngle(vehicles[v].heading); @@ -202,7 +202,7 @@ BusMap.Map = function(opts) { predictions.push("<div class='more'><a href='javascript:void(0);' onclick='$(this).hide().parent().parent().parent().addClass(\"show-all-predictions\");'>see more</a></div>"); } text += '<section class="predictions vehicle-predictions">' - + predictions.join("") + '</section>' + text_after; + + predictions.join("") + '</section>' + footer; that.vehicleMarkers[v]._popup.setContent(text); } } -- GitLab