Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Attempt to draw the entire length of a cherrypick merge line using a dashed line. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
236586d6f20e7c40579ea6c3535ace63 |
| User & Date: | drh 2018-12-27 19:55:42.795 |
Context
|
2018-12-28
| ||
| 12:59 | This checkin does a cherrypick merge off of another checkin that already has a prior full merge. The purpose of this checkin is to provide a test case for the cherrypick graph drawing logic. The code in this checkin is not intended to actually be used for anything. ... (Leaf check-in: dc81ac706b user: drh tags: graph-test-branch) | |
|
2018-12-27
| ||
| 20:13 | Fix a problem in which normal merge arrows were often drawn as normal merge arrows. ... (check-in: 8b3e3e007e user: drh tags: trunk) | |
| 19:55 | Attempt to draw the entire length of a cherrypick merge line using a dashed line. ... (check-in: 236586d6f2 user: drh tags: trunk) | |
| 19:39 | Show cherrypick merges on the default timeline. Disable the display of cherrypicks using the "ncp" query parameter. Currently, the only display difference between a normal merge and a cherrypick merges is in the final horizontal segment of the merge line as it moves into the child node. More work is needed on the display logic. ... (check-in: 55ab522cee user: drh tags: trunk) | |
Changes
Changes to src/default_css.txt.
| ︙ | ︙ | |||
170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
}
.tl-arrow.cherrypick.r {
border-left: 3px solid #000;
}
.tl-line.cherrypick {
width: 0px;
border-top: 1px dashed #000;
background: #fff;
}
.tl-arrow.warp {
margin-left: 1px;
border-width: 3px 0;
border-left: 7px solid #600000;
}
| > | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
}
.tl-arrow.cherrypick.r {
border-left: 3px solid #000;
}
.tl-line.cherrypick {
width: 0px;
border-top: 1px dashed #000;
border-left: 1px dashed #000;
background: #fff;
}
.tl-arrow.warp {
margin-left: 1px;
border-width: 3px 0;
border-left: 7px solid #600000;
}
|
| ︙ | ︙ |
Changes to src/graph.js.
| ︙ | ︙ | |||
242 243 244 245 246 247 248 249 250 251 |
if( p.hasOwnProperty('d') ) drawUpArrow({x: p.x, y: btm-node.h/2},p,p.fg);
}
if( p.hasOwnProperty('mo') ){
var x0 = p.x + node.w/2;
var x1 = p.mo*railPitch + node.w/2;
var u = tx.rowinfo[p.mu-tx.iTopRow];
var y1 = miLineY(u);
if( p.u<0 || p.mo!=p.r ){
x1 += mergeLines[p.mo] = -mLine.w/2;
var y0 = p.y+2;
| > | | | | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
if( p.hasOwnProperty('d') ) drawUpArrow({x: p.x, y: btm-node.h/2},p,p.fg);
}
if( p.hasOwnProperty('mo') ){
var x0 = p.x + node.w/2;
var x1 = p.mo*railPitch + node.w/2;
var u = tx.rowinfo[p.mu-tx.iTopRow];
var y1 = miLineY(u);
var drawMethod = (p.f&2) ? drawCherrypickLine : drawMergeLine;
if( p.u<0 || p.mo!=p.r ){
x1 += mergeLines[p.mo] = -mLine.w/2;
var y0 = p.y+2;
if( p.r!=p.mo ) drawMethod(x0,y0,x1+(x0<x1 ? mLine.w : 0),null);
drawMethod(x1,y0+mLine.w,null,y1);
}else if( mergeOffset ){
mergeLines[p.mo] = u.r<p.r ? -mergeOffset-mLine.w : mergeOffset;
x1 += mergeLines[p.mo];
drawMethod(x1,p.y+node.h/2,null,y1);
}else{
delete mergeLines[p.mo];
}
}
if( p.hasOwnProperty('au') ){
for( var i=0; i<p.au.length; i+=2 ){
var rail = p.au[i];
|
| ︙ | ︙ | |||
300 301 302 303 304 305 306 |
if( p.hasOwnProperty('cpi') ){
for( var i=0; i<p.cpi.length; i++ ){
var rail = p.cpi[i];
if( rail<0 ){
rail = -rail;
mergeLines[rail] = -mLine.w/2;
var x = rail*railPitch + (node.w-mLine.w)/2;
| | | 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
if( p.hasOwnProperty('cpi') ){
for( var i=0; i<p.cpi.length; i++ ){
var rail = p.cpi[i];
if( rail<0 ){
rail = -rail;
mergeLines[rail] = -mLine.w/2;
var x = rail*railPitch + (node.w-mLine.w)/2;
drawCherrypickLine(x,miLineY(p),null,btm);
}
drawMergeArrow(p,rail,1);
}
}
}
var mergeLines;
function renderGraph(){
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
873 874 875 876 877 878 879 880 881 882 883 884 885 886 |
** node has no merge children and no merge-out line is drawn.
** mu: The id of the row which is the top of the merge-out arrow.
** Only exists if "mo" exists.
** u: Draw a thick child-line out of the top of this node and up to
** the node with an id equal to this value. 0 if it is straight to
** the top of the page, -1 if there is no thick-line riser.
** f: 0x01: a leaf node.
** 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
| > | 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 |
** node has no merge children and no merge-out line is drawn.
** mu: The id of the row which is the top of the merge-out arrow.
** Only exists if "mo" exists.
** u: Draw a thick child-line out of the top of this node and up to
** the node with an id equal to this value. 0 if it is straight to
** the top of the page, -1 if there is no thick-line riser.
** f: 0x01: a leaf node.
** 0x02: all output merges are cherrypicks
** 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
|
| ︙ | ︙ | |||
901 902 903 904 905 906 907 |
cgi_printf("\"d\":%d,", pRow->bDescender);
}
if( pRow->mergeOut>=0 ){
cgi_printf("\"mo\":%d,", pRow->mergeOut);
cgi_printf("\"mu\":%d,", pRow->mergeUpto);
}
cgi_printf("\"u\":%d,", pRow->aiRiser[pRow->iRail]);
| > > > | | 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 |
cgi_printf("\"d\":%d,", pRow->bDescender);
}
if( pRow->mergeOut>=0 ){
cgi_printf("\"mo\":%d,", pRow->mergeOut);
cgi_printf("\"mu\":%d,", pRow->mergeUpto);
}
cgi_printf("\"u\":%d,", pRow->aiRiser[pRow->iRail]);
k = 0;
if( pRow->isLeaf ) k |= 1;
if( pRow->nCherrypick>=pRow->nParent-1 ) k |= 2;
cgi_printf("\"f\":%d,",k);
for(i=k=0; i<GR_MAX_RAIL; i++){
if( i==pRow->iRail ) continue;
if( pRow->aiRiser[i]>0 ){
if( k==0 ){
cgi_printf("\"au\":");
cSep = '[';
}
|
| ︙ | ︙ |