Skip to content

Commit

Permalink
Added description of magic numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
pbking committed Feb 12, 2024
1 parent 5f1d6b4 commit b5f5984
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ function FontCollection( { slug } ) {
[ collectionFonts, filters ]
);

// NOTE: The height of the font library modal unavailable to use for rendering font family items is roughly 417px
// The hight of each font family item is 61px
const pageSize = Math.floor( ( window.innerHeight - 417 ) / 61 );
const totalPages = Math.ceil( fonts.length / pageSize );
const itemsStart = ( page - 1 ) * pageSize;
Expand Down

0 comments on commit b5f5984

Please sign in to comment.