Fix: Half rendered rows with Scroller displayBuffer = 1

Fix: Half rendered rows with Scroller displayBuffer = 1

rehreh Posts: 1Questions: 0Answers: 0
edited April 2014 in Bug reports
Datatables 1.9.4 / Scroller 1.1.0

I've got a table with generated images in each row. I don't want them to be requested until they are visible so I set displayBuffer = 1 for Scroller. I often have a half row at the top or bottom of the table that is unrendered. To fix this I needed to make two changes:

this.s.viewportRows = parseInt( this.s.viewportHeight/this.s.rowHeight, 10 )+1;
to
this.s.viewportRows = parseInt( this.s.viewportHeight/this.s.rowHeight, 10 )+2;


var preRows = ((this.s.displayBuffer-1)/2) * this.s.viewportRows;
to
var preRows = ((this.s.displayBuffer-1)/2) * this.s.viewportRows + 1;

Hope this is of use!

Replies

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Thanks very much or this. i'll look at merging it in!

    Allan
This discussion has been closed.