File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 212
212
}
213
213
214
214
delta . lastCalcIndex = Math . max ( delta . lastCalcIndex , index )
215
+ delta . lastCalcIndex = Math . min ( delta . lastCalcIndex , delta . total - 1 )
215
216
216
217
return offset
217
218
} ,
218
219
219
220
// return a variable size (height) from a given index.
220
221
getVarSize : function ( index ) {
221
222
var cache = this . delta . varCache [ index ]
222
- return ( cache && cache . size ) || this . variable ( index ) || 0
223
+ return ( cache && cache . size ) || this . variable ( index ) || this . size
223
224
} ,
224
225
225
226
// return the paddingBottom when variable height base current zone.
226
227
getVarPaddingBottom ( ) {
227
228
var delta = this . delta
228
- var rest = delta . total - delta . lastCalcIndex
229
- if ( rest <= delta . keeps || delta . lastCalcIndex >= delta . total ) {
229
+ if ( delta . total - delta . end <= delta . keeps || delta . lastCalcIndex === delta . total - 1 ) {
230
230
return this . getVarOffset ( delta . total ) - this . getVarOffset ( delta . end )
231
231
} else {
232
232
// if unreached last zone or uncalculate real behind offset
233
233
// continue return the estimate paddingBottom avoid max calculate.
234
- return ( delta . total - delta . lastCalcIndex ) * ( delta . averageSize || this . size )
234
+ return ( delta . total - delta . end ) * ( delta . averageSize || this . size )
235
235
}
236
236
} ,
237
237
You can’t perform that action at this time.
0 commit comments