Skip to content

Commit d1927b7

Browse files
committed
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
1 parent cbd3707 commit d1927b7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

static/skin/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
function viewPortToCount(){
7171
const zoom = Math.floor((( window.outerWidth - 10 ) / window.innerWidth) * 100);
72-
return Math.floor(window.innerHeight/(3*zoom) + 1)*(window.innerWidth/(2.5*zoom) + 1);
72+
return Math.floor((window.innerHeight/(3*zoom) + 1)*(window.innerWidth/(2.5*zoom) + 1));
7373
}
7474

7575
function getInnerHtml(node, query) {

test/server.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ R"EXPECTEDRESULT( src="/ROOT/skin/jquery-ui/external/jquery/jquery.js?cache
319319
src: url("/ROOT/skin/fonts/Roboto.ttf?cacheid=84d10248") format("truetype");
320320
<script src="/ROOT/skin/isotope.pkgd.min.js?cacheid=2e48d392" defer></script>
321321
<script src="/ROOT/skin/iso6391To3.js?cacheid=ecde2bb3"></script>
322-
<script type="text/javascript" src="/ROOT/skin/index.js?cacheid=0951f06f" defer></script>
322+
<script type="text/javascript" src="/ROOT/skin/index.js?cacheid=b9aafe60" defer></script>
323323
)EXPECTEDRESULT"
324324
},
325325
{

0 commit comments

Comments
 (0)