Fossil SCM
Automatically omit merge risers from the graph when the graph is scrunched due to many rails. Make sure there is adequate spacing between the graph and text when the graph is scrunched.
Commit
dafc3fe42aa40666f5e0456832c3a93dd9273c56
Parent
e81344f3bd663c1…
6 files changed
+1
-1
+1
-1
+15
-7
+15
-7
+8
+8
+1
-1
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -535,11 +535,11 @@ | ||
| 535 | 535 | graph_finish(pGraph, 1); |
| 536 | 536 | if( pGraph->nErr ){ |
| 537 | 537 | graph_free(pGraph); |
| 538 | 538 | pGraph = 0; |
| 539 | 539 | }else{ |
| 540 | - int w = (pGraph->mxRail+1)*pGraph->iRailPitch + 10; | |
| 540 | + int w = pGraph->mxRail*pGraph->iRailPitch + 28; | |
| 541 | 541 | @ <tr><td></td><td> |
| 542 | 542 | @ <div id="grbtm" style="width:%d(w)px;"></div> |
| 543 | 543 | @ </td><td></td></tr> |
| 544 | 544 | } |
| 545 | 545 | } |
| 546 | 546 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -535,11 +535,11 @@ | |
| 535 | graph_finish(pGraph, 1); |
| 536 | if( pGraph->nErr ){ |
| 537 | graph_free(pGraph); |
| 538 | pGraph = 0; |
| 539 | }else{ |
| 540 | int w = (pGraph->mxRail+1)*pGraph->iRailPitch + 10; |
| 541 | @ <tr><td></td><td> |
| 542 | @ <div id="grbtm" style="width:%d(w)px;"></div> |
| 543 | @ </td><td></td></tr> |
| 544 | } |
| 545 | } |
| 546 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -535,11 +535,11 @@ | |
| 535 | graph_finish(pGraph, 1); |
| 536 | if( pGraph->nErr ){ |
| 537 | graph_free(pGraph); |
| 538 | pGraph = 0; |
| 539 | }else{ |
| 540 | int w = pGraph->mxRail*pGraph->iRailPitch + 28; |
| 541 | @ <tr><td></td><td> |
| 542 | @ <div id="grbtm" style="width:%d(w)px;"></div> |
| 543 | @ </td><td></td></tr> |
| 544 | } |
| 545 | } |
| 546 |
+1
-1
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -535,11 +535,11 @@ | ||
| 535 | 535 | graph_finish(pGraph, 1); |
| 536 | 536 | if( pGraph->nErr ){ |
| 537 | 537 | graph_free(pGraph); |
| 538 | 538 | pGraph = 0; |
| 539 | 539 | }else{ |
| 540 | - int w = (pGraph->mxRail+1)*pGraph->iRailPitch + 10; | |
| 540 | + int w = pGraph->mxRail*pGraph->iRailPitch + 28; | |
| 541 | 541 | @ <tr><td></td><td> |
| 542 | 542 | @ <div id="grbtm" style="width:%d(w)px;"></div> |
| 543 | 543 | @ </td><td></td></tr> |
| 544 | 544 | } |
| 545 | 545 | } |
| 546 | 546 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -535,11 +535,11 @@ | |
| 535 | graph_finish(pGraph, 1); |
| 536 | if( pGraph->nErr ){ |
| 537 | graph_free(pGraph); |
| 538 | pGraph = 0; |
| 539 | }else{ |
| 540 | int w = (pGraph->mxRail+1)*pGraph->iRailPitch + 10; |
| 541 | @ <tr><td></td><td> |
| 542 | @ <div id="grbtm" style="width:%d(w)px;"></div> |
| 543 | @ </td><td></td></tr> |
| 544 | } |
| 545 | } |
| 546 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -535,11 +535,11 @@ | |
| 535 | graph_finish(pGraph, 1); |
| 536 | if( pGraph->nErr ){ |
| 537 | graph_free(pGraph); |
| 538 | pGraph = 0; |
| 539 | }else{ |
| 540 | int w = pGraph->mxRail*pGraph->iRailPitch + 28; |
| 541 | @ <tr><td></td><td> |
| 542 | @ <div id="grbtm" style="width:%d(w)px;"></div> |
| 543 | @ </td><td></td></tr> |
| 544 | } |
| 545 | } |
| 546 |
+15
-7
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -586,11 +586,11 @@ | ||
| 586 | 586 | }else{ |
| 587 | 587 | int w; |
| 588 | 588 | /* style is not moved to css, because this is |
| 589 | 589 | ** a technical div for the timeline graph |
| 590 | 590 | */ |
| 591 | - w = (pGraph->mxRail+1)*pGraph->iRailPitch + 10; | |
| 591 | + w = pGraph->mxRail*pGraph->iRailPitch + 28; | |
| 592 | 592 | @ <tr><td></td><td> |
| 593 | 593 | @ <div id="grbtm" style="width:%d(w)px;"></div> |
| 594 | 594 | @ </td><td></td></tr> |
| 595 | 595 | } |
| 596 | 596 | } |
| @@ -610,18 +610,23 @@ | ||
| 610 | 610 | ){ |
| 611 | 611 | if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){ |
| 612 | 612 | GraphRow *pRow; |
| 613 | 613 | int i; |
| 614 | 614 | char cSep; |
| 615 | - int mergeOffset; | |
| 615 | + int mergeOffset; /* Pixel offset from rail to merge riser */ | |
| 616 | + int iRailPitch; /* Pixels between consecutive rails */ | |
| 617 | + iRailPitch = pGraph->iRailPitch; | |
| 616 | 618 | |
| 617 | 619 | /* Number of pixels that the thin merge lines are offset from the |
| 618 | - ** the center of the think rail lines */ | |
| 619 | - mergeOffset = pGraph->iRailPitch>=14 ? 4 : pGraph->iRailPitch>=13 ? 3 : 0; | |
| 620 | + ** the center of the think rail lines. If zero, then the vertical | |
| 621 | + ** merge lines overlap with the thicker rail lines. | |
| 622 | + */ | |
| 623 | + mergeOffset = iRailPitch>=14 ? 4 : iRailPitch>=13 ? 3 : 0; | |
| 624 | + if( PB("nomo") ) mergeOffset = 0; | |
| 620 | 625 | |
| 621 | 626 | @ <script> |
| 622 | - @ var railPitch=%d(pGraph->iRailPitch); | |
| 627 | + @ var railPitch=%d(iRailPitch); | |
| 623 | 628 | |
| 624 | 629 | /* the rowinfo[] array contains all the information needed to generate |
| 625 | 630 | ** the graph. Each entry contains information for a single row: |
| 626 | 631 | ** |
| 627 | 632 | ** id: The id of the <div> element for the row. This is an integer. |
| @@ -656,11 +661,11 @@ | ||
| 656 | 661 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 657 | 662 | int mo = pRow->mergeOut; |
| 658 | 663 | if( mo<0 ){ |
| 659 | 664 | mo = 0; |
| 660 | 665 | }else{ |
| 661 | - int x = (mo/4)*pGraph->iRailPitch; | |
| 666 | + int x = (mo/4)*iRailPitch; | |
| 662 | 667 | switch( mo&3 ){ |
| 663 | 668 | case 0: x -= mergeOffset-2; break; |
| 664 | 669 | case 1: x += 1; break; |
| 665 | 670 | case 2: x += mergeOffset+1; break; |
| 666 | 671 | } |
| @@ -689,11 +694,13 @@ | ||
| 689 | 694 | cgi_printf("],mi:"); |
| 690 | 695 | /* mi */ |
| 691 | 696 | cSep = '['; |
| 692 | 697 | for(i=0; i<GR_MAX_RAIL; i++){ |
| 693 | 698 | if( pRow->mergeIn[i] ){ |
| 694 | - int mi = i*pGraph->iRailPitch - mergeOffset*(2 - pRow->mergeIn[i]); | |
| 699 | + int mi = i*iRailPitch; | |
| 700 | + if( pRow->mergeIn[i]==1 ) mi -= mergeOffset-1; | |
| 701 | + if( pRow->mergeIn[i]==3 ) mi += mergeOffset; | |
| 695 | 702 | if( pRow->mergeDown & (1<<i) ) mi = -mi; |
| 696 | 703 | cgi_printf("%c%d", cSep, mi); |
| 697 | 704 | cSep = ','; |
| 698 | 705 | } |
| 699 | 706 | } |
| @@ -819,10 +826,11 @@ | ||
| 819 | 826 | @ if( x1>=p.x-5 && x1<=p.x+5 ){ |
| 820 | 827 | @ y1 = p.y-5; |
| 821 | 828 | @ }else{ |
| 822 | 829 | @ drawThinLine(x0,y1,x1,y1); |
| 823 | 830 | @ } |
| 831 | + if( mergeOffset>0 ) cgi_printf("if( p.mo!=p.u-1 ) "); | |
| 824 | 832 | @ drawThinLine(x1,y0,x1,y1); |
| 825 | 833 | @ } |
| 826 | 834 | @ var n = p.au.length; |
| 827 | 835 | @ for(var i=0; i<n; i+=2){ |
| 828 | 836 | @ var x1 = p.au[i]*railPitch + left; |
| 829 | 837 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -586,11 +586,11 @@ | |
| 586 | }else{ |
| 587 | int w; |
| 588 | /* style is not moved to css, because this is |
| 589 | ** a technical div for the timeline graph |
| 590 | */ |
| 591 | w = (pGraph->mxRail+1)*pGraph->iRailPitch + 10; |
| 592 | @ <tr><td></td><td> |
| 593 | @ <div id="grbtm" style="width:%d(w)px;"></div> |
| 594 | @ </td><td></td></tr> |
| 595 | } |
| 596 | } |
| @@ -610,18 +610,23 @@ | |
| 610 | ){ |
| 611 | if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){ |
| 612 | GraphRow *pRow; |
| 613 | int i; |
| 614 | char cSep; |
| 615 | int mergeOffset; |
| 616 | |
| 617 | /* Number of pixels that the thin merge lines are offset from the |
| 618 | ** the center of the think rail lines */ |
| 619 | mergeOffset = pGraph->iRailPitch>=14 ? 4 : pGraph->iRailPitch>=13 ? 3 : 0; |
| 620 | |
| 621 | @ <script> |
| 622 | @ var railPitch=%d(pGraph->iRailPitch); |
| 623 | |
| 624 | /* the rowinfo[] array contains all the information needed to generate |
| 625 | ** the graph. Each entry contains information for a single row: |
| 626 | ** |
| 627 | ** id: The id of the <div> element for the row. This is an integer. |
| @@ -656,11 +661,11 @@ | |
| 656 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 657 | int mo = pRow->mergeOut; |
| 658 | if( mo<0 ){ |
| 659 | mo = 0; |
| 660 | }else{ |
| 661 | int x = (mo/4)*pGraph->iRailPitch; |
| 662 | switch( mo&3 ){ |
| 663 | case 0: x -= mergeOffset-2; break; |
| 664 | case 1: x += 1; break; |
| 665 | case 2: x += mergeOffset+1; break; |
| 666 | } |
| @@ -689,11 +694,13 @@ | |
| 689 | cgi_printf("],mi:"); |
| 690 | /* mi */ |
| 691 | cSep = '['; |
| 692 | for(i=0; i<GR_MAX_RAIL; i++){ |
| 693 | if( pRow->mergeIn[i] ){ |
| 694 | int mi = i*pGraph->iRailPitch - mergeOffset*(2 - pRow->mergeIn[i]); |
| 695 | if( pRow->mergeDown & (1<<i) ) mi = -mi; |
| 696 | cgi_printf("%c%d", cSep, mi); |
| 697 | cSep = ','; |
| 698 | } |
| 699 | } |
| @@ -819,10 +826,11 @@ | |
| 819 | @ if( x1>=p.x-5 && x1<=p.x+5 ){ |
| 820 | @ y1 = p.y-5; |
| 821 | @ }else{ |
| 822 | @ drawThinLine(x0,y1,x1,y1); |
| 823 | @ } |
| 824 | @ drawThinLine(x1,y0,x1,y1); |
| 825 | @ } |
| 826 | @ var n = p.au.length; |
| 827 | @ for(var i=0; i<n; i+=2){ |
| 828 | @ var x1 = p.au[i]*railPitch + left; |
| 829 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -586,11 +586,11 @@ | |
| 586 | }else{ |
| 587 | int w; |
| 588 | /* style is not moved to css, because this is |
| 589 | ** a technical div for the timeline graph |
| 590 | */ |
| 591 | w = pGraph->mxRail*pGraph->iRailPitch + 28; |
| 592 | @ <tr><td></td><td> |
| 593 | @ <div id="grbtm" style="width:%d(w)px;"></div> |
| 594 | @ </td><td></td></tr> |
| 595 | } |
| 596 | } |
| @@ -610,18 +610,23 @@ | |
| 610 | ){ |
| 611 | if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){ |
| 612 | GraphRow *pRow; |
| 613 | int i; |
| 614 | char cSep; |
| 615 | int mergeOffset; /* Pixel offset from rail to merge riser */ |
| 616 | int iRailPitch; /* Pixels between consecutive rails */ |
| 617 | iRailPitch = pGraph->iRailPitch; |
| 618 | |
| 619 | /* Number of pixels that the thin merge lines are offset from the |
| 620 | ** the center of the think rail lines. If zero, then the vertical |
| 621 | ** merge lines overlap with the thicker rail lines. |
| 622 | */ |
| 623 | mergeOffset = iRailPitch>=14 ? 4 : iRailPitch>=13 ? 3 : 0; |
| 624 | if( PB("nomo") ) mergeOffset = 0; |
| 625 | |
| 626 | @ <script> |
| 627 | @ var railPitch=%d(iRailPitch); |
| 628 | |
| 629 | /* the rowinfo[] array contains all the information needed to generate |
| 630 | ** the graph. Each entry contains information for a single row: |
| 631 | ** |
| 632 | ** id: The id of the <div> element for the row. This is an integer. |
| @@ -656,11 +661,11 @@ | |
| 661 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 662 | int mo = pRow->mergeOut; |
| 663 | if( mo<0 ){ |
| 664 | mo = 0; |
| 665 | }else{ |
| 666 | int x = (mo/4)*iRailPitch; |
| 667 | switch( mo&3 ){ |
| 668 | case 0: x -= mergeOffset-2; break; |
| 669 | case 1: x += 1; break; |
| 670 | case 2: x += mergeOffset+1; break; |
| 671 | } |
| @@ -689,11 +694,13 @@ | |
| 694 | cgi_printf("],mi:"); |
| 695 | /* mi */ |
| 696 | cSep = '['; |
| 697 | for(i=0; i<GR_MAX_RAIL; i++){ |
| 698 | if( pRow->mergeIn[i] ){ |
| 699 | int mi = i*iRailPitch; |
| 700 | if( pRow->mergeIn[i]==1 ) mi -= mergeOffset-1; |
| 701 | if( pRow->mergeIn[i]==3 ) mi += mergeOffset; |
| 702 | if( pRow->mergeDown & (1<<i) ) mi = -mi; |
| 703 | cgi_printf("%c%d", cSep, mi); |
| 704 | cSep = ','; |
| 705 | } |
| 706 | } |
| @@ -819,10 +826,11 @@ | |
| 826 | @ if( x1>=p.x-5 && x1<=p.x+5 ){ |
| 827 | @ y1 = p.y-5; |
| 828 | @ }else{ |
| 829 | @ drawThinLine(x0,y1,x1,y1); |
| 830 | @ } |
| 831 | if( mergeOffset>0 ) cgi_printf("if( p.mo!=p.u-1 ) "); |
| 832 | @ drawThinLine(x1,y0,x1,y1); |
| 833 | @ } |
| 834 | @ var n = p.au.length; |
| 835 | @ for(var i=0; i<n; i+=2){ |
| 836 | @ var x1 = p.au[i]*railPitch + left; |
| 837 |
+15
-7
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -586,11 +586,11 @@ | ||
| 586 | 586 | }else{ |
| 587 | 587 | int w; |
| 588 | 588 | /* style is not moved to css, because this is |
| 589 | 589 | ** a technical div for the timeline graph |
| 590 | 590 | */ |
| 591 | - w = (pGraph->mxRail+1)*pGraph->iRailPitch + 10; | |
| 591 | + w = pGraph->mxRail*pGraph->iRailPitch + 28; | |
| 592 | 592 | @ <tr><td></td><td> |
| 593 | 593 | @ <div id="grbtm" style="width:%d(w)px;"></div> |
| 594 | 594 | @ </td><td></td></tr> |
| 595 | 595 | } |
| 596 | 596 | } |
| @@ -610,18 +610,23 @@ | ||
| 610 | 610 | ){ |
| 611 | 611 | if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){ |
| 612 | 612 | GraphRow *pRow; |
| 613 | 613 | int i; |
| 614 | 614 | char cSep; |
| 615 | - int mergeOffset; | |
| 615 | + int mergeOffset; /* Pixel offset from rail to merge riser */ | |
| 616 | + int iRailPitch; /* Pixels between consecutive rails */ | |
| 617 | + iRailPitch = pGraph->iRailPitch; | |
| 616 | 618 | |
| 617 | 619 | /* Number of pixels that the thin merge lines are offset from the |
| 618 | - ** the center of the think rail lines */ | |
| 619 | - mergeOffset = pGraph->iRailPitch>=14 ? 4 : pGraph->iRailPitch>=13 ? 3 : 0; | |
| 620 | + ** the center of the think rail lines. If zero, then the vertical | |
| 621 | + ** merge lines overlap with the thicker rail lines. | |
| 622 | + */ | |
| 623 | + mergeOffset = iRailPitch>=14 ? 4 : iRailPitch>=13 ? 3 : 0; | |
| 624 | + if( PB("nomo") ) mergeOffset = 0; | |
| 620 | 625 | |
| 621 | 626 | @ <script> |
| 622 | - @ var railPitch=%d(pGraph->iRailPitch); | |
| 627 | + @ var railPitch=%d(iRailPitch); | |
| 623 | 628 | |
| 624 | 629 | /* the rowinfo[] array contains all the information needed to generate |
| 625 | 630 | ** the graph. Each entry contains information for a single row: |
| 626 | 631 | ** |
| 627 | 632 | ** id: The id of the <div> element for the row. This is an integer. |
| @@ -656,11 +661,11 @@ | ||
| 656 | 661 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 657 | 662 | int mo = pRow->mergeOut; |
| 658 | 663 | if( mo<0 ){ |
| 659 | 664 | mo = 0; |
| 660 | 665 | }else{ |
| 661 | - int x = (mo/4)*pGraph->iRailPitch; | |
| 666 | + int x = (mo/4)*iRailPitch; | |
| 662 | 667 | switch( mo&3 ){ |
| 663 | 668 | case 0: x -= mergeOffset-2; break; |
| 664 | 669 | case 1: x += 1; break; |
| 665 | 670 | case 2: x += mergeOffset+1; break; |
| 666 | 671 | } |
| @@ -689,11 +694,13 @@ | ||
| 689 | 694 | cgi_printf("],mi:"); |
| 690 | 695 | /* mi */ |
| 691 | 696 | cSep = '['; |
| 692 | 697 | for(i=0; i<GR_MAX_RAIL; i++){ |
| 693 | 698 | if( pRow->mergeIn[i] ){ |
| 694 | - int mi = i*pGraph->iRailPitch - mergeOffset*(2 - pRow->mergeIn[i]); | |
| 699 | + int mi = i*iRailPitch; | |
| 700 | + if( pRow->mergeIn[i]==1 ) mi -= mergeOffset-1; | |
| 701 | + if( pRow->mergeIn[i]==3 ) mi += mergeOffset; | |
| 695 | 702 | if( pRow->mergeDown & (1<<i) ) mi = -mi; |
| 696 | 703 | cgi_printf("%c%d", cSep, mi); |
| 697 | 704 | cSep = ','; |
| 698 | 705 | } |
| 699 | 706 | } |
| @@ -819,10 +826,11 @@ | ||
| 819 | 826 | @ if( x1>=p.x-5 && x1<=p.x+5 ){ |
| 820 | 827 | @ y1 = p.y-5; |
| 821 | 828 | @ }else{ |
| 822 | 829 | @ drawThinLine(x0,y1,x1,y1); |
| 823 | 830 | @ } |
| 831 | + if( mergeOffset>0 ) cgi_printf("if( p.mo!=p.u-1 ) "); | |
| 824 | 832 | @ drawThinLine(x1,y0,x1,y1); |
| 825 | 833 | @ } |
| 826 | 834 | @ var n = p.au.length; |
| 827 | 835 | @ for(var i=0; i<n; i+=2){ |
| 828 | 836 | @ var x1 = p.au[i]*railPitch + left; |
| 829 | 837 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -586,11 +586,11 @@ | |
| 586 | }else{ |
| 587 | int w; |
| 588 | /* style is not moved to css, because this is |
| 589 | ** a technical div for the timeline graph |
| 590 | */ |
| 591 | w = (pGraph->mxRail+1)*pGraph->iRailPitch + 10; |
| 592 | @ <tr><td></td><td> |
| 593 | @ <div id="grbtm" style="width:%d(w)px;"></div> |
| 594 | @ </td><td></td></tr> |
| 595 | } |
| 596 | } |
| @@ -610,18 +610,23 @@ | |
| 610 | ){ |
| 611 | if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){ |
| 612 | GraphRow *pRow; |
| 613 | int i; |
| 614 | char cSep; |
| 615 | int mergeOffset; |
| 616 | |
| 617 | /* Number of pixels that the thin merge lines are offset from the |
| 618 | ** the center of the think rail lines */ |
| 619 | mergeOffset = pGraph->iRailPitch>=14 ? 4 : pGraph->iRailPitch>=13 ? 3 : 0; |
| 620 | |
| 621 | @ <script> |
| 622 | @ var railPitch=%d(pGraph->iRailPitch); |
| 623 | |
| 624 | /* the rowinfo[] array contains all the information needed to generate |
| 625 | ** the graph. Each entry contains information for a single row: |
| 626 | ** |
| 627 | ** id: The id of the <div> element for the row. This is an integer. |
| @@ -656,11 +661,11 @@ | |
| 656 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 657 | int mo = pRow->mergeOut; |
| 658 | if( mo<0 ){ |
| 659 | mo = 0; |
| 660 | }else{ |
| 661 | int x = (mo/4)*pGraph->iRailPitch; |
| 662 | switch( mo&3 ){ |
| 663 | case 0: x -= mergeOffset-2; break; |
| 664 | case 1: x += 1; break; |
| 665 | case 2: x += mergeOffset+1; break; |
| 666 | } |
| @@ -689,11 +694,13 @@ | |
| 689 | cgi_printf("],mi:"); |
| 690 | /* mi */ |
| 691 | cSep = '['; |
| 692 | for(i=0; i<GR_MAX_RAIL; i++){ |
| 693 | if( pRow->mergeIn[i] ){ |
| 694 | int mi = i*pGraph->iRailPitch - mergeOffset*(2 - pRow->mergeIn[i]); |
| 695 | if( pRow->mergeDown & (1<<i) ) mi = -mi; |
| 696 | cgi_printf("%c%d", cSep, mi); |
| 697 | cSep = ','; |
| 698 | } |
| 699 | } |
| @@ -819,10 +826,11 @@ | |
| 819 | @ if( x1>=p.x-5 && x1<=p.x+5 ){ |
| 820 | @ y1 = p.y-5; |
| 821 | @ }else{ |
| 822 | @ drawThinLine(x0,y1,x1,y1); |
| 823 | @ } |
| 824 | @ drawThinLine(x1,y0,x1,y1); |
| 825 | @ } |
| 826 | @ var n = p.au.length; |
| 827 | @ for(var i=0; i<n; i+=2){ |
| 828 | @ var x1 = p.au[i]*railPitch + left; |
| 829 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -586,11 +586,11 @@ | |
| 586 | }else{ |
| 587 | int w; |
| 588 | /* style is not moved to css, because this is |
| 589 | ** a technical div for the timeline graph |
| 590 | */ |
| 591 | w = pGraph->mxRail*pGraph->iRailPitch + 28; |
| 592 | @ <tr><td></td><td> |
| 593 | @ <div id="grbtm" style="width:%d(w)px;"></div> |
| 594 | @ </td><td></td></tr> |
| 595 | } |
| 596 | } |
| @@ -610,18 +610,23 @@ | |
| 610 | ){ |
| 611 | if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){ |
| 612 | GraphRow *pRow; |
| 613 | int i; |
| 614 | char cSep; |
| 615 | int mergeOffset; /* Pixel offset from rail to merge riser */ |
| 616 | int iRailPitch; /* Pixels between consecutive rails */ |
| 617 | iRailPitch = pGraph->iRailPitch; |
| 618 | |
| 619 | /* Number of pixels that the thin merge lines are offset from the |
| 620 | ** the center of the think rail lines. If zero, then the vertical |
| 621 | ** merge lines overlap with the thicker rail lines. |
| 622 | */ |
| 623 | mergeOffset = iRailPitch>=14 ? 4 : iRailPitch>=13 ? 3 : 0; |
| 624 | if( PB("nomo") ) mergeOffset = 0; |
| 625 | |
| 626 | @ <script> |
| 627 | @ var railPitch=%d(iRailPitch); |
| 628 | |
| 629 | /* the rowinfo[] array contains all the information needed to generate |
| 630 | ** the graph. Each entry contains information for a single row: |
| 631 | ** |
| 632 | ** id: The id of the <div> element for the row. This is an integer. |
| @@ -656,11 +661,11 @@ | |
| 661 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 662 | int mo = pRow->mergeOut; |
| 663 | if( mo<0 ){ |
| 664 | mo = 0; |
| 665 | }else{ |
| 666 | int x = (mo/4)*iRailPitch; |
| 667 | switch( mo&3 ){ |
| 668 | case 0: x -= mergeOffset-2; break; |
| 669 | case 1: x += 1; break; |
| 670 | case 2: x += mergeOffset+1; break; |
| 671 | } |
| @@ -689,11 +694,13 @@ | |
| 694 | cgi_printf("],mi:"); |
| 695 | /* mi */ |
| 696 | cSep = '['; |
| 697 | for(i=0; i<GR_MAX_RAIL; i++){ |
| 698 | if( pRow->mergeIn[i] ){ |
| 699 | int mi = i*iRailPitch; |
| 700 | if( pRow->mergeIn[i]==1 ) mi -= mergeOffset-1; |
| 701 | if( pRow->mergeIn[i]==3 ) mi += mergeOffset; |
| 702 | if( pRow->mergeDown & (1<<i) ) mi = -mi; |
| 703 | cgi_printf("%c%d", cSep, mi); |
| 704 | cSep = ','; |
| 705 | } |
| 706 | } |
| @@ -819,10 +826,11 @@ | |
| 826 | @ if( x1>=p.x-5 && x1<=p.x+5 ){ |
| 827 | @ y1 = p.y-5; |
| 828 | @ }else{ |
| 829 | @ drawThinLine(x0,y1,x1,y1); |
| 830 | @ } |
| 831 | if( mergeOffset>0 ) cgi_printf("if( p.mo!=p.u-1 ) "); |
| 832 | @ drawThinLine(x1,y0,x1,y1); |
| 833 | @ } |
| 834 | @ var n = p.au.length; |
| 835 | @ for(var i=0; i<n; i+=2){ |
| 836 | @ var x1 = p.au[i]*railPitch + left; |
| 837 |
| --- test/graph-test-1.wiki | ||
| +++ test/graph-test-1.wiki | ||
| @@ -64,13 +64,21 @@ | ||
| 64 | 64 | Merge on the same branch does not result in a leaf. |
| 65 | 65 | </a> |
| 66 | 66 | * <a href="../../../timeline?c=20015206bc" |
| 67 | 67 | target="testwindow"> |
| 68 | 68 | This timeline has a hidden commit.</a> Click Unhide to reveal. |
| 69 | + * <a href="../../../timeline?y=ci&n=15&b=2a4e4cf03e" | |
| 70 | + target="testwindow">Isolated check-ins.</a> | |
| 69 | 71 | |
| 70 | 72 | External: |
| 71 | 73 | |
| 72 | 74 | * <a href="http://www.sqlite.org/src/timeline?c=2010-09-29&nd" |
| 73 | 75 | target="testwindow">Timewarp due to a mis-configured system clock.</a> |
| 74 | 76 | * <a href="http://core.tcl.tk/tk/finfo?name=tests/id.test" |
| 75 | 77 | target="testwindow">Show all three separate deletions of "id.test". |
| 76 | 78 | (Scroll down for the third deletion.) |
| 79 | + * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07' | |
| 80 | + target='testwindow'>Merge arrows to the left and to the right</a> | |
| 81 | + * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=13' | |
| 82 | + target='testwindow'>Previous, with a scrunched graph</a> | |
| 83 | + * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=11' | |
| 84 | + target='testwindow'>Previous, with a severely scrunched graph</a> | |
| 77 | 85 |
| --- test/graph-test-1.wiki | |
| +++ test/graph-test-1.wiki | |
| @@ -64,13 +64,21 @@ | |
| 64 | Merge on the same branch does not result in a leaf. |
| 65 | </a> |
| 66 | * <a href="../../../timeline?c=20015206bc" |
| 67 | target="testwindow"> |
| 68 | This timeline has a hidden commit.</a> Click Unhide to reveal. |
| 69 | |
| 70 | External: |
| 71 | |
| 72 | * <a href="http://www.sqlite.org/src/timeline?c=2010-09-29&nd" |
| 73 | target="testwindow">Timewarp due to a mis-configured system clock.</a> |
| 74 | * <a href="http://core.tcl.tk/tk/finfo?name=tests/id.test" |
| 75 | target="testwindow">Show all three separate deletions of "id.test". |
| 76 | (Scroll down for the third deletion.) |
| 77 |
| --- test/graph-test-1.wiki | |
| +++ test/graph-test-1.wiki | |
| @@ -64,13 +64,21 @@ | |
| 64 | Merge on the same branch does not result in a leaf. |
| 65 | </a> |
| 66 | * <a href="../../../timeline?c=20015206bc" |
| 67 | target="testwindow"> |
| 68 | This timeline has a hidden commit.</a> Click Unhide to reveal. |
| 69 | * <a href="../../../timeline?y=ci&n=15&b=2a4e4cf03e" |
| 70 | target="testwindow">Isolated check-ins.</a> |
| 71 | |
| 72 | External: |
| 73 | |
| 74 | * <a href="http://www.sqlite.org/src/timeline?c=2010-09-29&nd" |
| 75 | target="testwindow">Timewarp due to a mis-configured system clock.</a> |
| 76 | * <a href="http://core.tcl.tk/tk/finfo?name=tests/id.test" |
| 77 | target="testwindow">Show all three separate deletions of "id.test". |
| 78 | (Scroll down for the third deletion.) |
| 79 | * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07' |
| 80 | target='testwindow'>Merge arrows to the left and to the right</a> |
| 81 | * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=13' |
| 82 | target='testwindow'>Previous, with a scrunched graph</a> |
| 83 | * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=11' |
| 84 | target='testwindow'>Previous, with a severely scrunched graph</a> |
| 85 |
| --- test/graph-test-1.wiki | ||
| +++ test/graph-test-1.wiki | ||
| @@ -64,13 +64,21 @@ | ||
| 64 | 64 | Merge on the same branch does not result in a leaf. |
| 65 | 65 | </a> |
| 66 | 66 | * <a href="../../../timeline?c=20015206bc" |
| 67 | 67 | target="testwindow"> |
| 68 | 68 | This timeline has a hidden commit.</a> Click Unhide to reveal. |
| 69 | + * <a href="../../../timeline?y=ci&n=15&b=2a4e4cf03e" | |
| 70 | + target="testwindow">Isolated check-ins.</a> | |
| 69 | 71 | |
| 70 | 72 | External: |
| 71 | 73 | |
| 72 | 74 | * <a href="http://www.sqlite.org/src/timeline?c=2010-09-29&nd" |
| 73 | 75 | target="testwindow">Timewarp due to a mis-configured system clock.</a> |
| 74 | 76 | * <a href="http://core.tcl.tk/tk/finfo?name=tests/id.test" |
| 75 | 77 | target="testwindow">Show all three separate deletions of "id.test". |
| 76 | 78 | (Scroll down for the third deletion.) |
| 79 | + * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07' | |
| 80 | + target='testwindow'>Merge arrows to the left and to the right</a> | |
| 81 | + * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=13' | |
| 82 | + target='testwindow'>Previous, with a scrunched graph</a> | |
| 83 | + * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=11' | |
| 84 | + target='testwindow'>Previous, with a severely scrunched graph</a> | |
| 77 | 85 |
| --- test/graph-test-1.wiki | |
| +++ test/graph-test-1.wiki | |
| @@ -64,13 +64,21 @@ | |
| 64 | Merge on the same branch does not result in a leaf. |
| 65 | </a> |
| 66 | * <a href="../../../timeline?c=20015206bc" |
| 67 | target="testwindow"> |
| 68 | This timeline has a hidden commit.</a> Click Unhide to reveal. |
| 69 | |
| 70 | External: |
| 71 | |
| 72 | * <a href="http://www.sqlite.org/src/timeline?c=2010-09-29&nd" |
| 73 | target="testwindow">Timewarp due to a mis-configured system clock.</a> |
| 74 | * <a href="http://core.tcl.tk/tk/finfo?name=tests/id.test" |
| 75 | target="testwindow">Show all three separate deletions of "id.test". |
| 76 | (Scroll down for the third deletion.) |
| 77 |
| --- test/graph-test-1.wiki | |
| +++ test/graph-test-1.wiki | |
| @@ -64,13 +64,21 @@ | |
| 64 | Merge on the same branch does not result in a leaf. |
| 65 | </a> |
| 66 | * <a href="../../../timeline?c=20015206bc" |
| 67 | target="testwindow"> |
| 68 | This timeline has a hidden commit.</a> Click Unhide to reveal. |
| 69 | * <a href="../../../timeline?y=ci&n=15&b=2a4e4cf03e" |
| 70 | target="testwindow">Isolated check-ins.</a> |
| 71 | |
| 72 | External: |
| 73 | |
| 74 | * <a href="http://www.sqlite.org/src/timeline?c=2010-09-29&nd" |
| 75 | target="testwindow">Timewarp due to a mis-configured system clock.</a> |
| 76 | * <a href="http://core.tcl.tk/tk/finfo?name=tests/id.test" |
| 77 | target="testwindow">Show all three separate deletions of "id.test". |
| 78 | (Scroll down for the third deletion.) |
| 79 | * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07' |
| 80 | target='testwindow'>Merge arrows to the left and to the right</a> |
| 81 | * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=13' |
| 82 | target='testwindow'>Previous, with a scrunched graph</a> |
| 83 | * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=11' |
| 84 | target='testwindow'>Previous, with a severely scrunched graph</a> |
| 85 |