@@ -1865,7 +1865,7 @@ export class List<T> implements ISpliceable<T>, IDisposable {
18651865 return this . getFocus ( ) . map ( i => this . view . element ( i ) ) ;
18661866 }
18671867
1868- reveal ( index : number , relativeTop ?: number , paddingTop : number = 0 , applyRelativeTopOnlyIfNotVisible : boolean = false ) : void {
1868+ reveal ( index : number , relativeTop ?: number , paddingTop : number = 0 ) : void {
18691869 if ( index < 0 || index >= this . length ) {
18701870 throw new ListError ( this . user , `Invalid index ${ index } ` ) ;
18711871 }
@@ -1875,20 +1875,9 @@ export class List<T> implements ISpliceable<T>, IDisposable {
18751875 const elementHeight = this . view . elementHeight ( index ) ;
18761876
18771877 if ( isNumber ( relativeTop ) ) {
1878- let applyRelativeTop : boolean ;
1879- if ( applyRelativeTopOnlyIfNotVisible ) {
1880- const viewItemBottom = elementTop + elementHeight ;
1881- const scrollBottom = scrollTop + this . view . renderHeight ;
1882-
1883- applyRelativeTop = elementTop < scrollTop + paddingTop || viewItemBottom >= scrollBottom ;
1884- } else {
1885- applyRelativeTop = true ;
1886- }
1887- if ( applyRelativeTop ) {
1888- // y = mx + b
1889- const m = elementHeight - this . view . renderHeight + paddingTop ;
1890- this . view . setScrollTop ( m * clamp ( relativeTop , 0 , 1 ) + elementTop - paddingTop ) ;
1891- }
1878+ // y = mx + b
1879+ const m = elementHeight - this . view . renderHeight + paddingTop ;
1880+ this . view . setScrollTop ( m * clamp ( relativeTop , 0 , 1 ) + elementTop - paddingTop ) ;
18921881 } else {
18931882 const viewItemBottom = elementTop + elementHeight ;
18941883 const scrollBottom = scrollTop + this . view . renderHeight ;
0 commit comments