File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/algorithms/controllers Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -226,19 +226,19 @@ export default {
226
226
// init, before partition
227
227
highlight ( vis , cur_i )
228
228
highlight ( vis , cur_j )
229
- } else if ( cur_i !== undefined && tmp_j === undefined && prev_i !== undefined ) {
229
+ } else if ( isRecursionExpanded ( ) && cur_i !== undefined && tmp_j === undefined && prev_i !== undefined ) {
230
230
// just before first recursive call
231
231
unhighlight ( vis , prev_i )
232
232
if ( prev_j >= 0 ) // might have fallen off array
233
233
unhighlight ( vis , prev_j )
234
234
} else if ( checkingLeft ) {
235
- if ( prev_i !== undefined && prev_i !== cur_j )
235
+ if ( isRecursionExpanded ( ) && prev_i !== undefined && prev_i !== cur_j )
236
236
unhighlight ( vis , prev_i )
237
237
highlight ( vis , cur_i )
238
238
if ( arr && cur_i !== undefined )
239
239
updateBinary ( vis , arr [ cur_i ] )
240
240
} else {
241
- if ( prev_j !== undefined && prev_j !== cur_i )
241
+ if ( isRecursionExpanded ( ) && prev_j !== undefined && prev_j !== cur_i )
242
242
unhighlight ( vis , prev_j ) ;
243
243
if ( cur_j !== undefined ) { // might have fallen off array
244
244
highlight ( vis , cur_j ) ;
You can’t perform that action at this time.
0 commit comments