From 09eff0db7ee95ba7a338707d4f93526f786273c4 Mon Sep 17 00:00:00 2001 From: Mo Bitar Date: Tue, 6 Feb 2018 09:49:47 -0600 Subject: [PATCH] Use dynamic value for DefaultNotesToDisplayValue in notes list --- app/assets/javascripts/app/controllers/notes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/controllers/notes.js b/app/assets/javascripts/app/controllers/notes.js index 1fa4d95a0..878e7486e 100644 --- a/app/assets/javascripts/app/controllers/notes.js +++ b/app/assets/javascripts/app/controllers/notes.js @@ -95,7 +95,8 @@ angular.module('app') } } - this.DefaultNotesToDisplayValue = 20; + let MinNoteHeight = 51.0; // This is the height of a note cell with nothing but the title, which *is* a display option + this.DefaultNotesToDisplayValue = (document.documentElement.clientHeight / MinNoteHeight) || 20; this.notesToDisplay = this.DefaultNotesToDisplayValue; this.paginate = function() {