Skip to content

Commit

Permalink
web-ui: Add utils file
Browse files Browse the repository at this point in the history
Utils file has a function to get the number of rows to load depending on screen height
  • Loading branch information
JonSalazar committed Jan 17, 2019
1 parent 045fba3 commit 79cfe89
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web-ui/src/app/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function getNumberOfRowsForScreen(height: number): number {
if (height < 550) {
return 10;
}
return Math.min(10 + Math.ceil((height - 550) / 20), 100);
}

0 comments on commit 79cfe89

Please sign in to comment.