better scrolling

This commit is contained in:
Matteias Collet 2017-11-11 14:42:12 +01:00
parent ea569ab79a
commit 6f994a680d
3 changed files with 25 additions and 2 deletions

View file

@ -12,6 +12,29 @@ document.getElementById("checkList").addEventListener("click", function(ev) {
}
});
window.addEventListener("scroll", function(e) {
try {
document.getElementById("descriptionBox").style.left = (470 - window.pageXOffset) + "px";
if (document.getElementById("warningMessage").style.display != "none") {
if(window.pageYOffset > 120) {
document.getElementById("descriptionBox").style.top = "0px";
} else {
document.getElementById("descriptionBox").style.top = (120 - window.pageYOffset) + "px";
}
} else {
if(window.pageYOffset > 61) {
document.getElementById("descriptionBox").style.top = "0px";
} else {
document.getElementById("descriptionBox").style.top = (61 - window.pageYOffset - 11) + "px";
}
}
} catch (ex) {
console.log("error");
}
});
function parseXML(name) {
var xml = new XMLHttpRequest();
var file = "codes/" + name + ".xml";

View file

@ -20,7 +20,7 @@
<ul id="checkList">
</ul>
<button id="downloadButton" onclick="generateGCT()" style="visibility:hidden;">Download GCT</button>
<button id="dolphinDownloadButton" onclick="generateINI()" style="visibility:hidden; background-color:#5c90aa;">Download for Dolphin</button>
<button id="dolphinDownloadButton" onclick="generateINI()" style="visibility:hidden; background-color:#5c90aa; margin-bottom: 20px;">Download for Dolphin</button>
</center>
</div>
<div style="margin-left: 420px;">

View file

@ -140,7 +140,7 @@ th {
min-height: 150px;
overflow-y: auto;
overflow-x: hidden;
max-height: 100vh;
max-height: 80vh;
-ms-overflow-style: none;
}
.framed::-webkit-scrollbar {