haxwell / quizki

A question and answer database that generates exams.
http://www.quizki.com
GNU General Public License v2.0
4 stars 14 forks source link

Create Exam is not filling the screen with Question Rows.. #208

Open haxwell opened 6 years ago

haxwell commented 6 years ago

When Create Exam starts, it makes a call to the API for 10 rows, and displays them. It then expects that if you scroll down, it should make a call to the API for 10 more rows. It then displays those, until you scroll down again, and so forth.

A problem occurs when the browser window has enough height that it can display the 10 rows without scrolling. In this case, no scroll event is passed to the Create Exam code, and so no request is made for the next 10 rows. Only the original 10 appear on the screen, though there may be hundreds more.

Perhaps to resolve this, we take a measurement of the browser window. If the space available is greater than 10 times the height of a single line row, we should call the API with a request for enough rows to fill the screen. We could divide the space available by the height of a single line row, to get the number of rows to request plus two for good measure.

Or perhaps another solution? Thoughts?

haxwell commented 6 years ago

#208 - Create Exam is not filling the screen with Question Rows..