From a4c3cad018c8d328714e3d7b4929ae756bbbf4fb Mon Sep 17 00:00:00 2001 From: Manan Jethwani <2019282@iiitdmj.ac.in> Date: Tue, 10 Aug 2021 21:45:10 +0530 Subject: [PATCH] fixed books availablity on larger screens and added zoom level support --- static/skin/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/skin/index.js b/static/skin/index.js index 7e9e0c971..ae4484deb 100644 --- a/static/skin/index.js +++ b/static/skin/index.js @@ -62,7 +62,8 @@ } function viewPortToCount(){ - return Math.floor(window.innerHeight/300 + 1)*(window.innerWidth>1000 ? 4 : 3); + const zoom = Math.floor((( window.outerWidth - 10 ) / window.innerWidth) * 100); + return Math.floor(window.innerHeight/(3*zoom) + 1)*(window.innerWidth/(2.5*zoom) + 1); } function getInnerHtml(node, query) {