clean up isTrainLate()

This commit is contained in:
Andrew
2023-03-03 09:58:04 +00:00
parent 2cd6276d36
commit 71f8e59f2e

View File

@ -211,27 +211,12 @@ export default {
// method to determine whether or not a selected train is late
isTrainLate(i) {
// check if the train is running
if (this.allDataMap[i]["TrainStatus"][0] == "R") {
let publicMessage = this.allDataMap[i]["PublicMessage"][0];
let startTimeStr = publicMessage.indexOf("(");
// checking if the train is late
if (publicMessage[startTimeStr+1] != "-" && publicMessage[startTimeStr+1] != "0") {
return true;
// this.numLateRunningTrains += 1;
// if (!latest) {
// latest = this.dbLiveTrainData[i];
// }
//
// let timeEnd = publicMessage.indexOf(" ", startTimeStr+1);
// let num = parseInt(publicMessage.substring(startTimeStr+1, timeEnd))
//
// // new latest train
// if (num > currLatestTime) {
// latest = this.dbLiveTrainData[i]
// currLatestTime = num
// }
}
}
return false;