@@ -50,10 +50,13 @@ define(
50
50
if ( formatter && ! isNaN ( timeDelta ) ) {
51
51
self . textValue = formatter ( timeDelta ) ;
52
52
self . signValue = timeDelta < 0 ? "-" :
53
- timeDelta >= 1000 ? "+" : "" ;
53
+ timeDelta >= 1000 ? "+" : "" ;
54
+ self . signCssClass = timeDelta < 0 ? "icon-minus" :
55
+ timeDelta >= 1000 ? "icon-plus" : "" ;
54
56
} else {
55
57
self . textValue = "" ;
56
58
self . signValue = "" ;
59
+ self . signCssClass = "" ;
57
60
}
58
61
}
59
62
@@ -126,12 +129,13 @@ define(
126
129
}
127
130
128
131
/**
129
- * Get the glyph to display for the start/restart button.
130
- * @returns {string } glyph to display
132
+ * Get the CSS class to display the right icon
133
+ * for the start/restart button.
134
+ * @returns {string } cssclass to display
131
135
*/
132
- TimerController . prototype . buttonGlyph = function ( ) {
136
+ TimerController . prototype . buttonCssClass = function ( ) {
133
137
return this . relevantAction ?
134
- this . relevantAction . getMetadata ( ) . glyph : "" ;
138
+ this . relevantAction . getMetadata ( ) . cssclass : "" ;
135
139
} ;
136
140
137
141
/**
@@ -164,6 +168,15 @@ define(
164
168
return this . signValue ;
165
169
} ;
166
170
171
+ /**
172
+ * Get the sign (+ or -) of the current timer value, as
173
+ * a CSS class.
174
+ * @returns {string } sign of the current timer value
175
+ */
176
+ TimerController . prototype . signClass = function ( ) {
177
+ return this . signCssClass ;
178
+ } ;
179
+
167
180
/**
168
181
* Get the text to display for the current timer value.
169
182
* @returns {string } current timer value
0 commit comments