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 16:01:22 +00:00
parent 5efd6c7787
commit 5ec55f9c16

View File

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