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 {
226226 // init, before partition
227227 highlight ( vis , cur_i )
228228 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 ) {
230230 // just before first recursive call
231231 unhighlight ( vis , prev_i )
232232 if ( prev_j >= 0 ) // might have fallen off array
233233 unhighlight ( vis , prev_j )
234234 } else if ( checkingLeft ) {
235- if ( prev_i !== undefined && prev_i !== cur_j )
235+ if ( isRecursionExpanded ( ) && prev_i !== undefined && prev_i !== cur_j )
236236 unhighlight ( vis , prev_i )
237237 highlight ( vis , cur_i )
238238 if ( arr && cur_i !== undefined )
239239 updateBinary ( vis , arr [ cur_i ] )
240240 } else {
241- if ( prev_j !== undefined && prev_j !== cur_i )
241+ if ( isRecursionExpanded ( ) && prev_j !== undefined && prev_j !== cur_i )
242242 unhighlight ( vis , prev_j ) ;
243243 if ( cur_j !== undefined ) { // might have fallen off array
244244 highlight ( vis , cur_j ) ;
You can’t perform that action at this time.
0 commit comments