Fossil SCM
Fix a bug in graph display for when a merge descender is on rail zero, for example the merge descender on the bottom node of [/timeline?b=e5b1c70e2a6e0434&n=22].
Commit
2bbd70da660dad900f960de245beff18c07b834cbd8c417e633e0b3b9d067267
Parent
ebbfe7d99736648…
2 files changed
+4
-5
+4
-5
+4
-5
| --- src/graph.js | ||
| +++ src/graph.js | ||
| @@ -53,14 +53,13 @@ | ||
| 53 | 53 | ** is the rail on which the riser should run and the second integer |
| 54 | 54 | ** is the id of the node upto which the riser should run. If there |
| 55 | 55 | ** are no risers, this array does not exist. |
| 56 | 56 | ** mi: "merge-in". An array of integer rail positions from which |
| 57 | 57 | ** merge arrows should be drawn into this node. If the value is |
| 58 | -** negative, then the rail position is the absolute value of mi[] | |
| 59 | -** and a thin merge-arrow descender is drawn to the bottom of | |
| 60 | -** the screen. This array is omitted if there are no inbound | |
| 61 | -** merges. | |
| 58 | +** negative, then the rail position is -1-mi[] and a thin merge-arrow | |
| 59 | +** descender is drawn to the bottom of the screen. This array is | |
| 60 | +** omitted if there are no inbound merges. | |
| 62 | 61 | ** ci: "cherrypick-in". Like "mi" except for cherrypick merges. |
| 63 | 62 | ** omitted if there are no cherrypick merges. |
| 64 | 63 | ** h: The artifact hash of the object being graphed |
| 65 | 64 | */ |
| 66 | 65 | /* The amendCss() function does a one-time change to the CSS to account |
| @@ -512,11 +511,11 @@ | ||
| 512 | 511 | } |
| 513 | 512 | if( p.hasOwnProperty('mi') ){ |
| 514 | 513 | for( var i=0; i<p.mi.length; i++ ){ |
| 515 | 514 | var rail = p.mi[i]; |
| 516 | 515 | if( rail<0 ){ |
| 517 | - rail = -rail; | |
| 516 | + rail = -1-rail; | |
| 518 | 517 | mergeLines[rail] = -mLine.w/2; |
| 519 | 518 | var x = rail*railPitch + (node.w-mLine.w)/2; |
| 520 | 519 | var y = miLineY(p); |
| 521 | 520 | drawMergeLine(x,y,null,mergeBtm[rail]); |
| 522 | 521 | mergeBtm[rail] = y; |
| 523 | 522 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -53,14 +53,13 @@ | |
| 53 | ** is the rail on which the riser should run and the second integer |
| 54 | ** is the id of the node upto which the riser should run. If there |
| 55 | ** are no risers, this array does not exist. |
| 56 | ** mi: "merge-in". An array of integer rail positions from which |
| 57 | ** merge arrows should be drawn into this node. If the value is |
| 58 | ** negative, then the rail position is the absolute value of mi[] |
| 59 | ** and a thin merge-arrow descender is drawn to the bottom of |
| 60 | ** the screen. This array is omitted if there are no inbound |
| 61 | ** merges. |
| 62 | ** ci: "cherrypick-in". Like "mi" except for cherrypick merges. |
| 63 | ** omitted if there are no cherrypick merges. |
| 64 | ** h: The artifact hash of the object being graphed |
| 65 | */ |
| 66 | /* The amendCss() function does a one-time change to the CSS to account |
| @@ -512,11 +511,11 @@ | |
| 512 | } |
| 513 | if( p.hasOwnProperty('mi') ){ |
| 514 | for( var i=0; i<p.mi.length; i++ ){ |
| 515 | var rail = p.mi[i]; |
| 516 | if( rail<0 ){ |
| 517 | rail = -rail; |
| 518 | mergeLines[rail] = -mLine.w/2; |
| 519 | var x = rail*railPitch + (node.w-mLine.w)/2; |
| 520 | var y = miLineY(p); |
| 521 | drawMergeLine(x,y,null,mergeBtm[rail]); |
| 522 | mergeBtm[rail] = y; |
| 523 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -53,14 +53,13 @@ | |
| 53 | ** is the rail on which the riser should run and the second integer |
| 54 | ** is the id of the node upto which the riser should run. If there |
| 55 | ** are no risers, this array does not exist. |
| 56 | ** mi: "merge-in". An array of integer rail positions from which |
| 57 | ** merge arrows should be drawn into this node. If the value is |
| 58 | ** negative, then the rail position is -1-mi[] and a thin merge-arrow |
| 59 | ** descender is drawn to the bottom of the screen. This array is |
| 60 | ** omitted if there are no inbound merges. |
| 61 | ** ci: "cherrypick-in". Like "mi" except for cherrypick merges. |
| 62 | ** omitted if there are no cherrypick merges. |
| 63 | ** h: The artifact hash of the object being graphed |
| 64 | */ |
| 65 | /* The amendCss() function does a one-time change to the CSS to account |
| @@ -512,11 +511,11 @@ | |
| 511 | } |
| 512 | if( p.hasOwnProperty('mi') ){ |
| 513 | for( var i=0; i<p.mi.length; i++ ){ |
| 514 | var rail = p.mi[i]; |
| 515 | if( rail<0 ){ |
| 516 | rail = -1-rail; |
| 517 | mergeLines[rail] = -mLine.w/2; |
| 518 | var x = rail*railPitch + (node.w-mLine.w)/2; |
| 519 | var y = miLineY(p); |
| 520 | drawMergeLine(x,y,null,mergeBtm[rail]); |
| 521 | mergeBtm[rail] = y; |
| 522 |
+4
-5
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -925,14 +925,13 @@ | ||
| 925 | 925 | ** is the rail on which the riser should run and the second integer |
| 926 | 926 | ** is the id of the node upto which the riser should run. If there |
| 927 | 927 | ** are no risers, this array does not exist. |
| 928 | 928 | ** mi: "merge-in". An array of integer rail positions from which |
| 929 | 929 | ** merge arrows should be drawn into this node. If the value is |
| 930 | - ** negative, then the rail position is the absolute value of mi[] | |
| 931 | - ** and a thin merge-arrow descender is drawn to the bottom of | |
| 932 | - ** the screen. This array is omitted if there are no inbound | |
| 933 | - ** merges. | |
| 930 | + ** negative, then the rail position is -1-mi[] and a thin merge-arrow | |
| 931 | + ** descender is drawn to the bottom of the screen. This array is | |
| 932 | + ** omitted if there are no inbound merges. | |
| 934 | 933 | ** ci: "cherrypick-in". Like "mi" except for cherrypick merges. |
| 935 | 934 | ** omitted if there are no cherrypick merges. |
| 936 | 935 | ** h: The artifact hash of the object being graphed |
| 937 | 936 | * br: The branch to which the artifact belongs |
| 938 | 937 | */ |
| @@ -981,11 +980,11 @@ | ||
| 981 | 980 | } |
| 982 | 981 | /* mi */ |
| 983 | 982 | for(i=k=0; i<GR_MAX_RAIL; i++){ |
| 984 | 983 | if( pRow->mergeIn[i]==1 ){ |
| 985 | 984 | int mi = aiMap[i]; |
| 986 | - if( (pRow->mergeDown >> i) & 1 ) mi = -mi; | |
| 985 | + if( (pRow->mergeDown >> i) & 1 ) mi = -1-mi; | |
| 987 | 986 | if( k==0 ){ |
| 988 | 987 | cgi_printf("\"mi\":"); |
| 989 | 988 | cSep = '['; |
| 990 | 989 | } |
| 991 | 990 | k++; |
| 992 | 991 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -925,14 +925,13 @@ | |
| 925 | ** is the rail on which the riser should run and the second integer |
| 926 | ** is the id of the node upto which the riser should run. If there |
| 927 | ** are no risers, this array does not exist. |
| 928 | ** mi: "merge-in". An array of integer rail positions from which |
| 929 | ** merge arrows should be drawn into this node. If the value is |
| 930 | ** negative, then the rail position is the absolute value of mi[] |
| 931 | ** and a thin merge-arrow descender is drawn to the bottom of |
| 932 | ** the screen. This array is omitted if there are no inbound |
| 933 | ** merges. |
| 934 | ** ci: "cherrypick-in". Like "mi" except for cherrypick merges. |
| 935 | ** omitted if there are no cherrypick merges. |
| 936 | ** h: The artifact hash of the object being graphed |
| 937 | * br: The branch to which the artifact belongs |
| 938 | */ |
| @@ -981,11 +980,11 @@ | |
| 981 | } |
| 982 | /* mi */ |
| 983 | for(i=k=0; i<GR_MAX_RAIL; i++){ |
| 984 | if( pRow->mergeIn[i]==1 ){ |
| 985 | int mi = aiMap[i]; |
| 986 | if( (pRow->mergeDown >> i) & 1 ) mi = -mi; |
| 987 | if( k==0 ){ |
| 988 | cgi_printf("\"mi\":"); |
| 989 | cSep = '['; |
| 990 | } |
| 991 | k++; |
| 992 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -925,14 +925,13 @@ | |
| 925 | ** is the rail on which the riser should run and the second integer |
| 926 | ** is the id of the node upto which the riser should run. If there |
| 927 | ** are no risers, this array does not exist. |
| 928 | ** mi: "merge-in". An array of integer rail positions from which |
| 929 | ** merge arrows should be drawn into this node. If the value is |
| 930 | ** negative, then the rail position is -1-mi[] and a thin merge-arrow |
| 931 | ** descender is drawn to the bottom of the screen. This array is |
| 932 | ** omitted if there are no inbound merges. |
| 933 | ** ci: "cherrypick-in". Like "mi" except for cherrypick merges. |
| 934 | ** omitted if there are no cherrypick merges. |
| 935 | ** h: The artifact hash of the object being graphed |
| 936 | * br: The branch to which the artifact belongs |
| 937 | */ |
| @@ -981,11 +980,11 @@ | |
| 980 | } |
| 981 | /* mi */ |
| 982 | for(i=k=0; i<GR_MAX_RAIL; i++){ |
| 983 | if( pRow->mergeIn[i]==1 ){ |
| 984 | int mi = aiMap[i]; |
| 985 | if( (pRow->mergeDown >> i) & 1 ) mi = -1-mi; |
| 986 | if( k==0 ){ |
| 987 | cgi_printf("\"mi\":"); |
| 988 | cSep = '['; |
| 989 | } |
| 990 | k++; |
| 991 |