Merge branch 'master' of github.com:F1Vis/f1vis

This commit is contained in:
Jan Philipp Timme 2017-12-29 17:13:27 +01:00
commit 508e224883
1 changed files with 10 additions and 3 deletions

View File

@ -299,11 +299,18 @@ function createLineGraph(containerId, raceData){
}
function getLapTextArray(raceData, d){
var driverText = getDriverCodeById(raceData,d.driverId);
var lapText = "Lap: " + d.lap;
var posText = "Pos: " + d.position;
var returnArr = [driverText, lapText, posText];
if(d.time){
var timeText = "Time: " + d.time;
return [driverText, lapText, posText, timeText];
returnArr.push(timeText);
}
return returnArr;
}
function getPitStopTextArray(raceData, d){