@@ -142,17 +142,18 @@ export class Content {
142
142
143
143
private onScroll ( ev : UIEvent ) {
144
144
const timeStamp = Date . now ( ) ;
145
- const didStart = ! this . isScrolling ;
145
+ const shouldStart = ! this . isScrolling ;
146
146
this . lastScroll = timeStamp ;
147
- if ( didStart ) {
147
+ if ( shouldStart ) {
148
148
this . onScrollStart ( ) ;
149
+
149
150
}
150
151
if ( ! this . queued && this . scrollEvents ) {
151
152
this . queued = true ;
152
153
this . queue . read ( ts => {
153
154
this . queued = false ;
154
155
this . detail . event = ev ;
155
- updateScrollDetail ( this . detail , this . el , ts , didStart ) ;
156
+ updateScrollDetail ( this . detail , this . scrollEl , ts , shouldStart ) ;
156
157
this . ionScroll . emit ( this . detail ) ;
157
158
} ) ;
158
159
}
@@ -337,21 +338,22 @@ function getPageElement(el: HTMLElement) {
337
338
// ******** DOM READ ****************
338
339
function updateScrollDetail (
339
340
detail : ScrollDetail ,
340
- el : HTMLElement ,
341
+ el : Element ,
341
342
timestamp : number ,
342
- didStart : boolean
343
+ shouldStart : boolean
343
344
) {
344
345
const prevX = detail . currentX ;
345
346
const prevY = detail . currentY ;
346
347
const prevT = detail . timeStamp ;
347
348
const currentX = el . scrollLeft ;
348
349
const currentY = el . scrollTop ;
349
- if ( didStart ) {
350
+ if ( shouldStart ) {
350
351
// remember the start positions
351
352
detail . startTimeStamp = timestamp ;
352
353
detail . startX = currentX ;
353
354
detail . startY = currentY ;
354
355
detail . velocityX = detail . velocityY = 0 ;
356
+ console . log ( 'hhhhhh' ) ;
355
357
}
356
358
detail . timeStamp = timestamp ;
357
359
detail . currentX = detail . scrollLeft = currentX ;
0 commit comments