@@ -46,7 +46,7 @@ function easing(n: number) {
4646 return Math . sin ( ( n * Math . PI ) / 2 ) ;
4747}
4848
49- const SCROLL_ACCURCY = 30 ;
49+ const SCROLL_ACCURACY = 30 ;
5050
5151export interface IScroller extends IPublicModelScroller {
5252
@@ -142,15 +142,15 @@ export class Scroller implements IScroller {
142142 let sy = scrollTarget . top ;
143143 let ax = 0 ;
144144 let ay = 0 ;
145- if ( y < bounds . top + SCROLL_ACCURCY ) {
146- ay = - Math . min ( Math . max ( bounds . top + SCROLL_ACCURCY - y , 10 ) , 50 ) / scale ;
147- } else if ( y > bounds . bottom - SCROLL_ACCURCY ) {
148- ay = Math . min ( Math . max ( y + SCROLL_ACCURCY - bounds . bottom , 10 ) , 50 ) / scale ;
145+ if ( y < bounds . top + SCROLL_ACCURACY ) {
146+ ay = - Math . min ( Math . max ( bounds . top + SCROLL_ACCURACY - y , 10 ) , 50 ) / scale ;
147+ } else if ( y > bounds . bottom - SCROLL_ACCURACY ) {
148+ ay = Math . min ( Math . max ( y + SCROLL_ACCURACY - bounds . bottom , 10 ) , 50 ) / scale ;
149149 }
150- if ( x < bounds . left + SCROLL_ACCURCY ) {
151- ax = - Math . min ( Math . max ( bounds . top + SCROLL_ACCURCY - y , 10 ) , 50 ) / scale ;
152- } else if ( x > bounds . right - SCROLL_ACCURCY ) {
153- ax = Math . min ( Math . max ( x + SCROLL_ACCURCY - bounds . right , 10 ) , 50 ) / scale ;
150+ if ( x < bounds . left + SCROLL_ACCURACY ) {
151+ ax = - Math . min ( Math . max ( bounds . top + SCROLL_ACCURACY - y , 10 ) , 50 ) / scale ;
152+ } else if ( x > bounds . right - SCROLL_ACCURACY ) {
153+ ax = Math . min ( Math . max ( x + SCROLL_ACCURACY - bounds . right , 10 ) , 50 ) / scale ;
154154 }
155155
156156 if ( ! ax && ! ay ) {
0 commit comments