From ba6e87c3d748ef2cf442dc9165f6bc56e42fdeae Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Tue, 29 Jan 2019 14:02:13 +0000
Subject: [PATCH] Show bus stops on map (in blue)

---
 index.js |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index fc4a34d..8780766 100644
--- a/index.js
+++ b/index.js
@@ -137,9 +137,11 @@
 			var delay = parseDelay(data.actual[i]);
 			var delay_cell = addCellWithText(tr, delay);
 			
-			if(status == lang.boarding_sign) {
+			if(data.actual[i].status == 'STOPPING') {
 				tr.className = 'success';
-				status_cell.className = 'status-boarding';
+				if (data.actual[i].actualRelativeTime <= 0) {
+					status_cell.className = 'status-boarding';
+				}
 			} else if(parseInt(delay) > 9) {
 				tr.className = 'danger';
 				delay_cell.className = 'status-delayed';
@@ -400,6 +402,8 @@
 		setText(vehicle_data_style, '.vehicleData { display: table-cell; }')
 	});
 	
+	updateVehicleInfo()
+	
 	hash();
 	
 	window.addEventListener('hashchange', hash);

--
Gitblit v1.9.1