mirror of https://github.com/kiwix/libkiwix.git
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:
parent
8dbf015689
commit
2771a95d40
|
@ -69,7 +69,7 @@
|
||||||
|
|
||||||
function viewPortToCount(){
|
function viewPortToCount(){
|
||||||
const zoom = Math.floor((( window.outerWidth - 10 ) / window.innerWidth) * 100);
|
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) {
|
function getInnerHtml(node, query) {
|
||||||
|
|
|
@ -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");
|
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/isotope.pkgd.min.js?cacheid=2e48d392" defer></script>
|
||||||
<script src="/ROOT/skin/iso6391To3.js?cacheid=ecde2bb3"></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"
|
)EXPECTEDRESULT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue