Floor the value returned by viewPortToCount()

Previously, the value returned by viewPortToCount() could be a decimal number, this floors its value.
Helps in clean requests and caching.
Fix #766
This commit is contained in:
Nikhil Tanwar 2022-05-14 15:50:27 +05:30
parent 8dbf015689
commit 2771a95d40
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@
function viewPortToCount(){
const zoom = Math.floor((( window.outerWidth - 10 ) / window.innerWidth) * 100);
return Math.floor(window.innerHeight/(3*zoom) + 1)*(window.innerWidth/(2.5*zoom) + 1);
return Math.floor((window.innerHeight/(3*zoom) + 1)*(window.innerWidth/(2.5*zoom) + 1));
}
function getInnerHtml(node, query) {

View File

@ -319,7 +319,7 @@ R"EXPECTEDRESULT( src="/ROOT/skin/jquery-ui/external/jquery/jquery.js?cache
src: url("/ROOT/skin/fonts/Roboto.ttf?cacheid=84d10248") format("truetype");
<script src="/ROOT/skin/isotope.pkgd.min.js?cacheid=2e48d392" defer></script>
<script src="/ROOT/skin/iso6391To3.js?cacheid=ecde2bb3"></script>
<script type="text/javascript" src="/ROOT/skin/index.js?cacheid=c434aa35" defer></script>
<script type="text/javascript" src="/ROOT/skin/index.js?cacheid=31ffa1f7" defer></script>
)EXPECTEDRESULT"
},
{