@@ -50,6 +50,10 @@ app.controller('MainController', ['$interval', function($interval){
50
50
}
51
51
52
52
this . timer = new this . Timer ( 5 * 60 * 1000 , [ 4 * 60 * 1000 , 1 * 60 * 1000 , 0 , - 15 * 1000 ] ) ;
53
+
54
+ this . centre = function ( ) {
55
+ centre ( ) ;
56
+ }
53
57
} ] ) ;
54
58
55
59
app . filter ( 'minutes' , function ( ) {
@@ -130,7 +134,6 @@ app.controller('ButtonsController', function(){
130
134
131
135
app . controller ( "SettingsController" , function ( ) {
132
136
this . set = function ( main ) {
133
- $ ( '#motion' ) . text ( $ ( '#motion-input' ) . val ( ) ) ;
134
137
centre ( ) ;
135
138
var duration = Math . floor ( parseInt ( $ ( '#timer-minutes-input' ) . val ( ) , 10 ) * 60 + parseInt ( $ ( '#timer-seconds-input' ) . val ( ) , 10 ) ) * 1000 ;
136
139
var protectedLength = Math . floor ( parseInt ( $ ( '#protected-minutes-input' ) . val ( ) , 10 ) * 60 + parseInt ( $ ( '#protected-seconds-input' ) . val ( ) , 10 ) ) * 1000 ;
@@ -202,6 +205,7 @@ app.controller("DebatersController", function(){
202
205
203
206
function centre ( ) {
204
207
var margin = ( $ ( window ) . height ( ) - $ ( '.progress' ) . outerHeight ( ) ) / 2 + $ ( '.container' ) . offset ( ) . top - $ ( '.progress' ) . offset ( ) . top ;
208
+ console . log ( margin , $ ( '.container' ) . offset ( ) . top ) ;
205
209
if ( margin < 0 ) margin = 0 ;
206
210
$ ( '.container' ) . css ( 'margin-top' , margin ) ;
207
211
$ ( '#minutes' ) . css ( 'padding-left' , $ ( '.unit:last' ) . outerWidth ( ) + 20 ) ;
0 commit comments