@@ -4,7 +4,7 @@ IonicModule
4
4
'$rootScope' ,
5
5
'$timeout' ,
6
6
function ( $rootScope , $timeout ) {
7
- var BUFFER_SPACES = 2 ;
7
+ var BUFFER_SPACES = 1 ;
8
8
function CollectionView ( options ) {
9
9
this . dataSource = options . dataSource ;
10
10
this . element = options . element ;
@@ -88,7 +88,7 @@ function($rootScope, $timeout) {
88
88
render : function ( shouldRedrawAll ) {
89
89
var i ;
90
90
var itemsPerSpace = this . getItemsPerSpace ( ) ;
91
- var viewportSpaces = Math . floor ( this . getScrollSize ( ) / this . itemSizePrimary ) ;
91
+ var viewportSpaces = Math . ceil ( this . getScrollSize ( ) / this . itemSizePrimary ) ;
92
92
var viewportStartIndex = Math . ceil ( this . getScrollValue ( ) / this . itemSizePrimary ) *
93
93
itemsPerSpace ;
94
94
var viewportEndIndex = viewportStartIndex + ( viewportSpaces * itemsPerSpace ) ;
@@ -142,10 +142,6 @@ function($rootScope, $timeout) {
142
142
this . lastRenderScrollValue = Math . ceil ( this . bufferStartIndex / itemsPerSpace ) *
143
143
this . itemSizePrimary ;
144
144
145
- console . log ( 'render(). viewportStartIndex =' , viewportStartIndex ,
146
- 'bufferTransformOffset =' , this . bufferTransformOffset ,
147
- 'scrollValue ' , this . lastRenderScrollValue ) ;
148
-
149
145
if ( ! this . dataSource . scope . $$phase ) {
150
146
this . dataSource . scope . $digest ( ) ;
151
147
}
0 commit comments