Start: better scrolling of the description box - issue #1017

This commit is contained in:
Yorik van Havre 2014-03-08 13:42:18 -03:00
parent 109a961e35
commit f9c0abc176

View File

@ -207,6 +207,19 @@ page = """
}
}
function scroller() {
desc = document.getElementById("description");
base = document.getElementById("column").offsetTop;
scro = window.scrollY;
if (scro > base) {
desc.className = "stick";
} else {
desc.className = "";
}
}
document.onmousemove=scroller;
</script>
<style type="text/css">
@ -282,16 +295,15 @@ page = """
}
#description {
background: #windowcolor;
background: #222222;
border-radius: 5px;
padding: 8px;
color: #windowtextcolor;
color: #bdbdbd;
float: right;
width: 316px;
margin-right: 10px;
height: 100%;
position: fixed;
right: 10px;
height: 100%;
position: relative;
}
#description img {
@ -303,6 +315,12 @@ page = """
width: 300px !important;
}
.stick {
position: fixed !important;
top: 0px;
right: 18px !important;
}
</style>
</head>
@ -600,4 +618,4 @@ def handle():
def exportTestFile():
f = open(os.path.expanduser("~")+os.sep+"freecad-startpage.html","wb")
f.write(handle())
f.close()
f.close()