File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222
2323 FlipClock . Face = FlipClock . Base . extend ( {
2424
25+ /**
26+ * Sets whether or not the clock should start upon instantiation
27+ */
28+
29+ autoStart : true ,
30+
2531 /**
2632 * An array of jQuery objects used for the dividers (the colons)
2733 */
5157 this . dividers = [ ] ;
5258 this . lists = [ ] ;
5359 this . base ( options ) ;
54- this . factory = factory ;
60+ this . factory = factory ;
5561 } ,
5662
5763 /**
5864 * Build the clock face
5965 */
6066
61- build : function ( ) { } ,
67+ build : function ( ) {
68+ if ( this . autoStart ) {
69+ this . start ( ) ;
70+ }
71+ } ,
6272
6373 /**
6474 * Creates a jQuery object used for the digit divider
6979 */
7080
7181 createDivider : function ( label , css , excludeDots ) {
72-
7382 if ( typeof css == "boolean" || ! css ) {
7483 excludeDots = css ;
7584 css = label ;
129138 this . factor ,
130139 this . factory . original ? Math . round ( this . factory . original ) : 0
131140 ) ;
141+
132142 this . flip ( this . factory . original , false ) ;
133143 } ,
134144
173183 */
174184
175185 autoIncrement : function ( ) {
176- if ( ! ( this . factory . time . time instanceof Date ) ) {
177- if ( ! this . factory . countdown ) {
178- this . increment ( ) ;
179- }
180- else {
181- this . decrement ( ) ;
182- }
186+ if ( ! this . factory . countdown ) {
187+ this . increment ( ) ;
188+ }
189+ else {
190+ this . decrement ( ) ;
183191 }
184192 } ,
185193
You can’t perform that action at this time.
0 commit comments