haters are gonna hate https://i.imgur.com/OXXit7H.png
parent
0a08c07277
commit
c4fd6fb1d6
|
@ -5,6 +5,23 @@ var now;
|
||||||
var startTime;
|
var startTime;
|
||||||
var stopTime;
|
var stopTime;
|
||||||
|
|
||||||
|
function displayClockLimit(limit) {
|
||||||
|
switch (limit) {
|
||||||
|
case 30:
|
||||||
|
return '½';
|
||||||
|
case 45:
|
||||||
|
return '¾';
|
||||||
|
case 90:
|
||||||
|
return '1.5';
|
||||||
|
default:
|
||||||
|
return limit / 60;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayClock(clock) {
|
||||||
|
return displayClockLimit(clock.limit) + "+" + clock.increment;
|
||||||
|
}
|
||||||
|
|
||||||
function leftPos(time) {
|
function leftPos(time) {
|
||||||
return scale * (time - startTime) / 1000 / 60;
|
return scale * (time - startTime) / 1000 / 60;
|
||||||
}
|
}
|
||||||
|
@ -112,7 +129,7 @@ function renderTournament(ctrl, tour) {
|
||||||
title: tour.perf.name
|
title: tour.perf.name
|
||||||
} : null),
|
} : null),
|
||||||
m('span.name', tour.fullName),
|
m('span.name', tour.fullName),
|
||||||
m('span.clock', tour.clock.limit / 60 + "+" + tour.clock.increment),
|
m('span.clock', displayClock(tour.clock)),
|
||||||
tour.variant.key === 'standard' ? null : m('span.variant', tour.variant.name),
|
tour.variant.key === 'standard' ? null : m('span.variant', tour.variant.name),
|
||||||
tour.position ? m('span', 'Thematic') : null,
|
tour.position ? m('span', 'Thematic') : null,
|
||||||
m('span', tour.rated ? ctrl.trans('rated') : ctrl.trans('casual')),
|
m('span', tour.rated ? ctrl.trans('rated') : ctrl.trans('casual')),
|
||||||
|
|
Loading…
Reference in New Issue