Fossil SCM
The smart "scroll to" routine also needs to scroll upwards when used for their new purpose.
Commit
fff09df34ff57b8d0c95c6b3910646adde05376d23e3537de0217257692e2fd2
Parent
b02508d358a2e06…
1 file changed
+1
-2
+1
-2
| --- src/graph.js | ||
| +++ src/graph.js | ||
| @@ -911,12 +911,11 @@ | ||
| 911 | 911 | function focusScrollToIntoViewTheFossilWay(e){ |
| 912 | 912 | var y = 0; |
| 913 | 913 | do{ |
| 914 | 914 | y += e.offsetTop; |
| 915 | 915 | }while( e = e.offsetParent ); |
| 916 | - y -= window.innerHeight/2; | |
| 917 | - if( y>0 ) window.scrollTo(0,y); | |
| 916 | + window.scrollTo(0,y-window.innerHeight/2); | |
| 918 | 917 | } |
| 919 | 918 | function focusVisualize(id,scroll){ |
| 920 | 919 | var td = document.querySelector('.timelineFocused'); |
| 921 | 920 | if( td ) td.classList.remove('timelineFocused'); |
| 922 | 921 | if( !id ) return true; |
| 923 | 922 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -911,12 +911,11 @@ | |
| 911 | function focusScrollToIntoViewTheFossilWay(e){ |
| 912 | var y = 0; |
| 913 | do{ |
| 914 | y += e.offsetTop; |
| 915 | }while( e = e.offsetParent ); |
| 916 | y -= window.innerHeight/2; |
| 917 | if( y>0 ) window.scrollTo(0,y); |
| 918 | } |
| 919 | function focusVisualize(id,scroll){ |
| 920 | var td = document.querySelector('.timelineFocused'); |
| 921 | if( td ) td.classList.remove('timelineFocused'); |
| 922 | if( !id ) return true; |
| 923 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -911,12 +911,11 @@ | |
| 911 | function focusScrollToIntoViewTheFossilWay(e){ |
| 912 | var y = 0; |
| 913 | do{ |
| 914 | y += e.offsetTop; |
| 915 | }while( e = e.offsetParent ); |
| 916 | window.scrollTo(0,y-window.innerHeight/2); |
| 917 | } |
| 918 | function focusVisualize(id,scroll){ |
| 919 | var td = document.querySelector('.timelineFocused'); |
| 920 | if( td ) td.classList.remove('timelineFocused'); |
| 921 | if( !id ) return true; |
| 922 |