@@ -70,14 +70,9 @@ export function setBasketball(t, stateObj, c, team, oppo) {
70
70
// in2 = quarter;
71
71
// score = split score into 2 parts
72
72
// record = set to second part of split score
73
- // scoreOP = adjust opacity based on total runs
74
73
75
74
export function setCricket ( t , stateObj , c , team , oppo ) {
76
- var runs_substring = [ ] ;
77
- var runs = [ ] ;
78
- var total_runs = [ ] ;
79
75
var subscores = [ ] ;
80
- var i = 0 ;
81
76
82
77
c . timeoutsDisplay = 'none' ;
83
78
c . barDisplay = "none" ;
@@ -100,37 +95,6 @@ export function setCricket(t, stateObj, c, team, oppo) {
100
95
if ( subscores [ 2 ] . length > 1 ) {
101
96
c . record [ 2 ] = "(" + subscores [ 2 ] [ 1 ] ;
102
97
}
103
-
104
- if ( stateObj . state == 'POST' ) {
105
- runs_substring [ 1 ] = c . score [ 1 ] . split ( "/" ) ;
106
- runs_substring [ 2 ] = c . score [ 2 ] . split ( "/" ) ;
107
-
108
- runs [ 1 ] = runs_substring [ 1 ] [ 0 ] . split ( "&" ) ;
109
- runs [ 2 ] = runs_substring [ 2 ] [ 0 ] . split ( "&" ) ;
110
-
111
- total_runs [ 1 ] = 0 ;
112
- total_runs [ 2 ] = 0 ;
113
-
114
- i = 0 ;
115
- while ( i < runs [ 1 ] . length ) {
116
- total_runs [ 1 ] = total_runs [ 1 ] + Number ( runs [ 1 ] [ i ] ) ;
117
- i = i + 1 ;
118
- }
119
- i = 0 ;
120
- while ( i < runs [ 2 ] . length ) {
121
- total_runs [ 2 ] = total_runs [ 2 ] + Number ( runs [ 2 ] [ i ] ) ;
122
- i = i + 1 ;
123
- }
124
-
125
- if ( total_runs [ 1 ] > total_runs [ 2 ] ) {
126
- c . scoreOp [ 1 ] = 1.0 ;
127
- c . scoreOp [ 2 ] = 0.6 ;
128
- }
129
- if ( total_runs [ 1 ] < total_runs [ 2 ] ) {
130
- c . scoreOp [ 1 ] = 0.6 ;
131
- c . scoreOp [ 2 ] = 1.0 ;
132
- }
133
- }
134
98
}
135
99
}
136
100
}
@@ -144,7 +108,6 @@ export function setCricket(t, stateObj, c, team, oppo) {
144
108
// barLabel = team_total_shots, opponent_total_shots
145
109
// finalTerm = clock
146
110
// timeoutsDisplay = 'none';
147
- // scoreOp = adjust opacity to show lowest score as winner
148
111
//
149
112
export function setGolf ( t , stateObj , c , team , oppo ) {
150
113
c . title = c . title || stateObj . attributes . event_name ;
@@ -156,14 +119,6 @@ export function setGolf(t, stateObj, c, team, oppo) {
156
119
c . finalTerm = stateObj . attributes . clock ;
157
120
c . timeoutsDisplay = 'none' ;
158
121
159
- if ( Number ( c . score [ 1 ] ) < Number ( c . score [ 2 ] ) ) {
160
- c . scoreOp [ 1 ] = 1.0 ;
161
- c . scoreOp [ 2 ] = 0.6 ;
162
- }
163
- if ( Number ( c . score [ 2 ] ) < Number ( c . score [ 1 ] ) ) {
164
- c . scoreOp [ 1 ] = 0.6 ;
165
- c . scoreOp [ 2 ] = 1.0 ;
166
- }
167
122
}
168
123
169
124
//
@@ -206,7 +161,6 @@ export function setMMA(t, stateObj, c, team, oppo) {
206
161
// timeoutsDisplay = 'none';
207
162
// barLength = team_total_shots, opponent_total_shots (laps)
208
163
// barLabel = (laps)
209
- // scoreOp = adjust opacity to show lowest score as winner
210
164
// If NASCAR, remove logos and use initials
211
165
//
212
166
export function setRacing ( t , stateObj , c , team , oppo ) {
@@ -223,15 +177,6 @@ export function setRacing(t, stateObj, c, team, oppo) {
223
177
c . barLabel [ team ] = t . translate ( "racing.teamBarLabel" , "%s" , String ( stateObj . attributes . team_total_shots ) ) ;
224
178
c . barLabel [ oppo ] = t . translate ( "racing.teamBarLabel" , "%s" , String ( stateObj . attributes . team_total_shots ) ) ;
225
179
226
- if ( Number ( c . score [ 1 ] ) < Number ( c . score [ 2 ] ) ) {
227
- c . scoreOp [ 1 ] = 1.0 ;
228
- c . scoreOp [ 2 ] = 0.6 ;
229
- }
230
- if ( Number ( c . score [ 2 ] ) < Number ( c . score [ 1 ] ) ) {
231
- c . scoreOp [ 1 ] = 0.6 ;
232
- c . scoreOp [ 2 ] = 1.0 ;
233
- }
234
-
235
180
if ( stateObj . attributes . league . includes ( "NASCAR" ) ) {
236
181
c . logo [ team ] = null ;
237
182
c . logo [ oppo ] = null ;
0 commit comments