@@ -1865,7 +1865,7 @@ export class List<T> implements ISpliceable<T>, IDisposable {
1865
1865
return this . getFocus ( ) . map ( i => this . view . element ( i ) ) ;
1866
1866
}
1867
1867
1868
- reveal ( index : number , relativeTop ?: number , paddingTop : number = 0 , applyRelativeTopOnlyIfNotVisible : boolean = false ) : void {
1868
+ reveal ( index : number , relativeTop ?: number , paddingTop : number = 0 ) : void {
1869
1869
if ( index < 0 || index >= this . length ) {
1870
1870
throw new ListError ( this . user , `Invalid index ${ index } ` ) ;
1871
1871
}
@@ -1875,20 +1875,9 @@ export class List<T> implements ISpliceable<T>, IDisposable {
1875
1875
const elementHeight = this . view . elementHeight ( index ) ;
1876
1876
1877
1877
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 ) ;
1892
1881
} else {
1893
1882
const viewItemBottom = elementTop + elementHeight ;
1894
1883
const scrollBottom = scrollTop + this . view . renderHeight ;
0 commit comments