X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=js%2Findex.js;h=f58a403d42ac7ff2d9590e456b4a664e3efc95b8;hb=8d4d23009371e7ca83e0793185f0ae8485190007;hp=02e490e30312bc9d3661d6bc64e7af8703670ee0;hpb=6d7bb9ad7a5f416a4ca6ff31fa024218ef083e46;p=westcastle.git diff --git a/js/index.js b/js/index.js index 02e490e..f58a403 100644 --- a/js/index.js +++ b/js/index.js @@ -154,8 +154,8 @@ new Vue({ }, 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; @@ -193,7 +193,7 @@ new Vue({ }; }, template: ` -
+
{{ formattedTime }}
@@ -206,9 +206,12 @@ new Vue({ 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) {