Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | 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]. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
2bbd70da660dad900f960de245beff18 |
| User & Date: | drh 2022-03-22 13:45:13.939 |
Context
|
2022-03-22
| ||
| 15:53 | In the graph, when a merge riser comes up out of a leaf on a different rail, try to shift the branch rail to be directly underneath the merge riser. ... (check-in: 1e70f826b9 user: drh tags: trunk) | |
| 13:45 | 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]. ... (check-in: 2bbd70da66 user: drh tags: trunk) | |
| 13:30 | Improved comments on the graph layout rail shuffling. ... (check-in: ebbfe7d997 user: drh tags: trunk) | |
Changes
Changes to src/graph.js.
| ︙ | ︙ | |||
51 52 53 54 55 56 57 | ** au: An array of integers that define thick-line risers for branches. ** The integers are in pairs. For each pair, the first integer is ** is the rail on which the riser should run and the second integer ** is the id of the node upto which the riser should run. If there ** are no risers, this array does not exist. ** mi: "merge-in". An array of integer rail positions from which ** merge arrows should be drawn into this node. If the value is | | | | < | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | ** au: An array of integers that define thick-line risers for branches. ** The integers are in pairs. For each pair, the first integer is ** is the rail on which the riser should run and the second integer ** is the id of the node upto which the riser should run. If there ** are no risers, this array does not exist. ** mi: "merge-in". An array of integer rail positions from which ** merge arrows should be drawn into this node. If the value is ** negative, then the rail position is -1-mi[] and a thin merge-arrow ** descender is drawn to the bottom of the screen. This array is ** omitted if there are no inbound merges. ** ci: "cherrypick-in". Like "mi" except for cherrypick merges. ** omitted if there are no cherrypick merges. ** h: The artifact hash of the object being graphed */ /* The amendCss() function does a one-time change to the CSS to account ** for the "circleNodes" and "showArrowheads" settings. Do this change ** only once, even if there are multiple graphs being rendered. |
| ︙ | ︙ | |||
510 511 512 513 514 515 516 |
}
}
}
if( p.hasOwnProperty('mi') ){
for( var i=0; i<p.mi.length; i++ ){
var rail = p.mi[i];
if( rail<0 ){
| | | 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
}
}
}
if( p.hasOwnProperty('mi') ){
for( var i=0; i<p.mi.length; i++ ){
var rail = p.mi[i];
if( rail<0 ){
rail = -1-rail;
mergeLines[rail] = -mLine.w/2;
var x = rail*railPitch + (node.w-mLine.w)/2;
var y = miLineY(p);
drawMergeLine(x,y,null,mergeBtm[rail]);
mergeBtm[rail] = y;
}
drawMergeArrow(p,rail,0);
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
923 924 925 926 927 928 929 |
** au: An array of integers that define thick-line risers for branches.
** The integers are in pairs. For each pair, the first integer is
** is the rail on which the riser should run and the second integer
** is the id of the node upto which the riser should run. If there
** are no risers, this array does not exist.
** mi: "merge-in". An array of integer rail positions from which
** merge arrows should be drawn into this node. If the value is
| | | | < | 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 |
** au: An array of integers that define thick-line risers for branches.
** The integers are in pairs. For each pair, the first integer is
** is the rail on which the riser should run and the second integer
** is the id of the node upto which the riser should run. If there
** are no risers, this array does not exist.
** mi: "merge-in". An array of integer rail positions from which
** merge arrows should be drawn into this node. If the value is
** negative, then the rail position is -1-mi[] and a thin merge-arrow
** descender is drawn to the bottom of the screen. This array is
** omitted if there are no inbound merges.
** ci: "cherrypick-in". Like "mi" except for cherrypick merges.
** omitted if there are no cherrypick merges.
** h: The artifact hash of the object being graphed
* br: The branch to which the artifact belongs
*/
aiMap = pGraph->aiRailMap;
for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){
|
| ︙ | ︙ | |||
979 980 981 982 983 984 985 |
if( colorGraph && pRow->zBgClr[0]=='#' ){
cgi_printf("\"fg\":\"%s\",", bg_to_fg(pRow->zBgClr));
}
/* mi */
for(i=k=0; i<GR_MAX_RAIL; i++){
if( pRow->mergeIn[i]==1 ){
int mi = aiMap[i];
| | | 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 |
if( colorGraph && pRow->zBgClr[0]=='#' ){
cgi_printf("\"fg\":\"%s\",", bg_to_fg(pRow->zBgClr));
}
/* mi */
for(i=k=0; i<GR_MAX_RAIL; i++){
if( pRow->mergeIn[i]==1 ){
int mi = aiMap[i];
if( (pRow->mergeDown >> i) & 1 ) mi = -1-mi;
if( k==0 ){
cgi_printf("\"mi\":");
cSep = '[';
}
k++;
cgi_printf("%c%d", cSep, mi);
cSep = ',';
|
| ︙ | ︙ |