Fixing attempt for timer position
[westcastle.git] / js / index.js
index 0d2adad..f58a403 100644 (file)
@@ -193,7 +193,7 @@ new Vue({
                                };
                        },
                        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>
@@ -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) {