2017-11-15 19:46:47 +01:00
|
|
|
"use strict";
|
2017-11-15 20:19:15 +01:00
|
|
|
|
2017-11-16 23:08:14 +01:00
|
|
|
/*
|
|
|
|
* This file contains the main control flow.
|
|
|
|
*/
|
|
|
|
|
2017-11-16 23:32:20 +01:00
|
|
|
preprocessor.load(function(data) {
|
2017-12-22 09:40:26 +01:00
|
|
|
var $frame = $('.strecken-selector');
|
|
|
|
var $slidee = $frame.children('ul').eq(0);
|
|
|
|
var $wrap = $frame.parent();
|
|
|
|
var options = {
|
|
|
|
horizontal: 1,
|
|
|
|
itemNav: 'basic',
|
|
|
|
smart: 1,
|
|
|
|
activateOn: 'click',
|
|
|
|
mouseDragging: 1,
|
|
|
|
touchDragging: 1,
|
|
|
|
releaseSwing: 1,
|
|
|
|
startAt: 3,
|
|
|
|
scrollBar: $wrap.find('.scrollbar'),
|
|
|
|
scrollBy: 1,
|
|
|
|
pagesBar: $wrap.find('.pages'),
|
|
|
|
activatePageOn: 'click',
|
|
|
|
speed: 300,
|
|
|
|
elasticBounds: 1,
|
|
|
|
dragHandle: 1,
|
|
|
|
dynamicHandle: 1,
|
|
|
|
clickBar: 1,
|
|
|
|
};
|
|
|
|
$('.frame').sly(options);
|
|
|
|
|
2017-12-08 13:50:41 +01:00
|
|
|
// Some sample code for a year selector - TODO: Improve a lot and move somewhere else
|
|
|
|
var yearSelector = $("#seasonByYearSelector");
|
2017-12-17 10:38:48 +01:00
|
|
|
var seasons = processor.getSeasonsWithLapData();
|
|
|
|
for(var season in seasons){ yearSelector.append("<option>" + seasons[season].year + "</option>"); }
|
2017-11-16 23:57:21 +01:00
|
|
|
|
2017-12-15 14:00:44 +01:00
|
|
|
createLineGraph("#lineGraphBox", processor.getRace(970));
|
2017-11-16 23:57:21 +01:00
|
|
|
});
|