@@ -48,7 +48,6 @@ define([
48
48
49
49
this . fmts = [ 'utc' ] ;
50
50
this . sources = [ new LocalClock ( $timeout , DEFAULT_PERIOD ) ] ;
51
- this . defaultValues = undefined ;
52
51
}
53
52
54
53
UTCTimeSystem . prototype = Object . create ( TimeSystem . prototype ) ;
@@ -65,25 +64,18 @@ define([
65
64
return this . sources ;
66
65
} ;
67
66
68
- UTCTimeSystem . prototype . defaults = function ( defaults ) {
69
- if ( arguments . length > 0 ) {
70
- this . defaultValues = defaults ;
71
- }
67
+ UTCTimeSystem . prototype . defaults = function ( ) {
68
+ var now = Math . ceil ( Date . now ( ) / 1000 ) * 1000 ;
69
+ var ONE_MINUTE = 60 * 1 * 1000 ;
70
+ var FIFTY_YEARS = 50 * 365 * 24 * 60 * 60 * 1000 ;
72
71
73
- if ( this . defaultValues === undefined ) {
74
- var now = Math . ceil ( Date . now ( ) / 1000 ) * 1000 ;
75
- var ONE_MINUTE = 60 * 1 * 1000 ;
76
- var FIFTY_YEARS = 50 * 365 * 24 * 60 * 60 * 1000 ;
77
-
78
- this . defaultValues = {
79
- key : 'utc-default' ,
80
- name : 'UTC time system defaults' ,
81
- deltas : { start : FIFTEEN_MINUTES , end : 0 } ,
82
- bounds : { start : now - FIFTEEN_MINUTES , end : now } ,
83
- zoom : { min : FIFTY_YEARS , max : ONE_MINUTE }
84
- } ;
85
- }
86
- return this . defaultValues ;
72
+ return {
73
+ key : 'utc-default' ,
74
+ name : 'UTC time system defaults' ,
75
+ deltas : { start : FIFTEEN_MINUTES , end : 0 } ,
76
+ bounds : { start : now - FIFTEEN_MINUTES , end : now } ,
77
+ zoom : { min : FIFTY_YEARS , max : ONE_MINUTE }
78
+ } ;
87
79
} ;
88
80
89
81
return UTCTimeSystem ;
0 commit comments