stoping requesting more and more rows causing browser to stall, if browser does not give us height for rows (probably because it defered rendering)

This commit is contained in:
Ralf Becker 2015-04-28 15:58:26 +00:00
parent 77fb3a8ee9
commit 812a9bbe8d

View File

@ -425,8 +425,8 @@ var et2_dataview_grid = et2_dataview_container.extend(et2_dataview_IViewRange,
}
}
// Calculate the average height
if (avgCount > 0)
// Calculate the average height, but only if we have a height
if (avgCount > 0 && avgSum > 0)
{
this._avgHeight = avgSum / avgCount;
this._avgCount = avgCount;