From f9c0abc17670fc098dfe1312c882a2ceef571d04 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sat, 8 Mar 2014 13:42:18 -0300 Subject: [PATCH] Start: better scrolling of the description box - issue #1017 --- src/Mod/Start/StartPage/StartPage.py | 30 ++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py index 31eea5060..5a7057391 100644 --- a/src/Mod/Start/StartPage/StartPage.py +++ b/src/Mod/Start/StartPage/StartPage.py @@ -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; + @@ -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()