},
setScore: function() {
let sortedSessions = this.sessions[this.currentIndex]
- .map( (s,i) => { return {value:s, index:i}; })
- .sort( (a,b) => { return parseInt(b.value) - parseInt(a.value); });
+ .map( (s,i) => { return {value:parseInt(s), index:i}; })
+ .sort( (a,b) => { return b.value - a.value; });
let pdts = [4, 2, 1, 0];
// NOTE: take care of ex-aequos (spread points subtotal)
let curSum = 0, curCount = 0, start = 0;
};
},
template: `
- <div id="timer" :style="{lineHeight: textHeight + 'px', fontSize: 0.66*textHeight + 'px'}">
+ <div id="timer" :style="{lineHeight: divHeight + 'px', fontSize: 0.66*divHeight + 'px', width: divWidth + 'px', height: divHeight + 'px'}">
<div @click.left="pauseResume()" @click.right.prevent="reset()" :class="{timeout:time==0}">
{{ formattedTime }}
</div>
let minutes = Math.floor(this.time / 60);
return this.padToZero(minutes) + ":" + this.padToZero(seconds);
},
- textHeight: function() {
+ divHeight: function() {
return screen.height;
},
+ divWidth: function() {
+ return screen.width;
+ },
},
methods: {
padToZero: function(a) {