@@ -245,7 +245,7 @@ angular.module('ui.scroll', [])
245
245
ridActual++
246
246
pending = []
247
247
248
- reload = ->
248
+ reloadImpl = ->
249
249
dismissPendingRequests ()
250
250
first = 1
251
251
next = 1
@@ -257,7 +257,6 @@ angular.module('ui.scroll', [])
257
257
adjustBuffer ridActual
258
258
259
259
shouldLoadBottom = ->
260
- # log "bottom pos #{viewport.bottomDataPos()} < bottom visible #{bottomVisiblePos()} + padding #{bufferPadding()} "
261
260
! eof && viewport .bottomDataPos () < viewport .bottomVisiblePos () + bufferPadding ()
262
261
263
262
clipBottom = ->
@@ -286,7 +285,6 @@ angular.module('ui.scroll', [])
286
285
# log 'clipped off bottom ' + overage + ' bottom padding ' + viewport.bottomPadding()
287
286
288
287
shouldLoadTop = ->
289
- # log "top pos #{viewport.topDataPos()} > top visible #{topVisiblePos()} - padding #{bufferPadding()}"
290
288
! bof && (viewport .topDataPos () > viewport .topVisiblePos () - bufferPadding ())
291
289
292
290
clipTop = ->
@@ -309,7 +307,6 @@ angular.module('ui.scroll', [])
309
307
viewport .topPadding (viewport .topPadding () + topHeight)
310
308
buffer .remove (0 , overage)
311
309
first += overage
312
- # log 'clipped off top ' + overage + ' top padding ' + builder.topPadding()
313
310
314
311
enqueueFetch = (rid , direction )->
315
312
if ! adapter .isLoading
@@ -500,7 +497,7 @@ angular.module('ui.scroll', [])
500
497
viewport .bind ' scroll' , resizeAndScrollHandler
501
498
viewport .bind ' mousewheel' , wheelHandler
502
499
503
- $scope .$watch datasource .revision , reload
500
+ $scope .$watch datasource .revision , reloadImpl
504
501
505
502
$scope .$on ' $destroy' , ->
506
503
# clear the buffer. It is necessary to remove the elements and $destroy the scopes
@@ -514,7 +511,7 @@ angular.module('ui.scroll', [])
514
511
515
512
adapter = {}
516
513
adapter .isLoading = false
517
- adapter .reload = reload
514
+ adapter .reload = reloadImpl
518
515
519
516
applyUpdate = (wrapper , newItems ) ->
520
517
if angular .isArray newItems
0 commit comments