Fossil

Check-in [7b3def02]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the click coordinates so that they work even when the page has been scrolled.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | click-graph-to-diff
Files: files | file ages | folders
SHA1: 7b3def02ed41fd0c1e44416ac40dfbebbc8e27bc
User & Date: drh 2012-11-30 03:33:40
Context
2012-11-30
15:22
Click on the timeline graph once to select a node. Click on a different node to see a diff between the two nodes. Click on the selected node to unselect it. check-in: 5bff5e5c user: drh tags: trunk
03:33
Fix the click coordinates so that they work even when the page has been scrolled. Closed-Leaf check-in: 7b3def02 user: drh tags: click-graph-to-diff
03:14
Fix compiler warning. check-in: 95cce92a user: drh tags: click-graph-to-diff
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/timeline.c.

748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
#endif
    @   for(var i in rowinfo){
    @     drawNode(rowinfo[i], left, btm);
    @   }
    @   if( selRow!=null ) clickOnRow(selRow);
    @ }
    @ function clickOnGraph(event){
    @   var x=event.clientX-absoluteX("canvas");
    @   var y=event.clientY-absoluteY("canvas");
    @   for(var i in rowinfo){
    @     p = rowinfo[i];
    @     if( p.y<y-10 ) continue;
    @     if( p.y>y+10 ) break;
    @     if( p.x>x-10 && p.x<x+10 ){
    @       clickOnRow(p);
    @       break;







|
|







748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
#endif
    @   for(var i in rowinfo){
    @     drawNode(rowinfo[i], left, btm);
    @   }
    @   if( selRow!=null ) clickOnRow(selRow);
    @ }
    @ function clickOnGraph(event){
    @   var x=event.clientX-absoluteX("canvas")+window.pageXOffset;
    @   var y=event.clientY-absoluteY("canvas")+window.pageYOffset;
    @   for(var i in rowinfo){
    @     p = rowinfo[i];
    @     if( p.y<y-10 ) continue;
    @     if( p.y>y+10 ) break;
    @     if( p.x>x-10 && p.x<x+10 ){
    @       clickOnRow(p);
    @       break;