More preparations to place race infos later
This commit is contained in:
1 parent
6b315b3b2b
commit
7d7f35d3ca
2 files changed
+9
-5
No files matched your search
+8
-4
@@ -54,15 +54,19 @@ preprocessor.load(function(data) {
|
||||
"<div class=\"courseimagecontainer\"></div>" + raceD.raceInfo.date.toLocaleDateString("de-DE") + "</li>");
|
||||
|
||||
$("#courseSelection li").click(function(event) {
|
||||
var raceI = event.currentTarget.attributes.data.value;
|
||||
// Internal check if element was already selected
|
||||
if(slyelement.curRaceId == raceI){ return true; }
|
||||
slyelement.curRaceId = raceI;
|
||||
// Clear previously selected courses
|
||||
$("#courseSelection .selected").removeClass("selected");
|
||||
// Mark selected course
|
||||
$(event.currentTarget).addClass("selected");
|
||||
// Hand off to diagram rendering
|
||||
var raceI = event.currentTarget.attributes.data.value;
|
||||
if(slyelement.curRaceId == raceI){ return; }
|
||||
slyelement.curRaceId = raceI;
|
||||
// Fetch race data
|
||||
var rdata = slyelement.curRaces.filter(r => r.raceInfo.raceId == raceI)[0];
|
||||
// Put information about race into info box
|
||||
$("#race-infobox").html("joah");
|
||||
// Hand off to diagram rendering
|
||||
$("#lineGraphBox").empty();
|
||||
createLineGraph("#lineGraphBox", rdata);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user