@@ -340,7 +340,7 @@ export class PrompterViewContent extends React.Component<Translated<IProps & ITr
340340 if ( ! next ) return
341341
342342 const targetOffsetTop = next . getBoundingClientRect ( ) . top + window . pageYOffset
343- this . animateScrollTo ( targetOffsetTop - scrollMargin )
343+ this . animateScrollTo ( targetOffsetTop - scrollMargin )
344344 }
345345 scrollToPrevious ( ) : void {
346346 const scrollMargin = this . calculateScrollPosition ( )
@@ -350,7 +350,7 @@ export class PrompterViewContent extends React.Component<Translated<IProps & ITr
350350 if ( ! target ) return
351351
352352 const targetOffsetTop = target [ 0 ] + window . pageYOffset
353- this . animateScrollTo ( targetOffsetTop - scrollMargin )
353+ this . animateScrollTo ( targetOffsetTop - scrollMargin )
354354 }
355355 scrollToFollowing ( ) : void {
356356 const scrollMargin = this . calculateScrollPosition ( )
@@ -364,15 +364,11 @@ export class PrompterViewContent extends React.Component<Translated<IProps & ITr
364364 }
365365 private animateScrollTo ( scrollToPosition : number ) {
366366 this . _lastAnimation ?. stop ( )
367- this . _lastAnimation = animate (
368- window . scrollY ,
369- scrollToPosition ,
370- {
371- duration : 0.4 ,
372- ease : 'easeOut' ,
373- onUpdate : ( latest ) => window . scrollTo ( 0 , latest ) ,
374- }
375- )
367+ this . _lastAnimation = animate ( window . scrollY , scrollToPosition , {
368+ duration : 0.4 ,
369+ ease : 'easeOut' ,
370+ onUpdate : ( latest ) => window . scrollTo ( 0 , latest ) ,
371+ } )
376372 }
377373 listAnchorPositions ( startY : number , endY : number , sortDirection = 1 ) : [ number , Element ] [ ] {
378374 let foundPositions : [ number , Element ] [ ] = [ ]
0 commit comments