Fossil SCM

Attempt to draw the entire length of a cherrypick merge line using a dashed line.

drh 2018-12-27 19:55 trunk
Commit 236586d6f20e7c40579ea6c3535ace63d445e4adef06fabba861a7a7ba5f5cd5
--- src/default_css.txt
+++ src/default_css.txt
@@ -172,10 +172,11 @@
172172
border-left: 3px solid #000;
173173
}
174174
.tl-line.cherrypick {
175175
width: 0px;
176176
border-top: 1px dashed #000;
177
+ border-left: 1px dashed #000;
177178
background: #fff;
178179
}
179180
.tl-arrow.warp {
180181
margin-left: 1px;
181182
border-width: 3px 0;
182183
--- src/default_css.txt
+++ src/default_css.txt
@@ -172,10 +172,11 @@
172 border-left: 3px solid #000;
173 }
174 .tl-line.cherrypick {
175 width: 0px;
176 border-top: 1px dashed #000;
 
177 background: #fff;
178 }
179 .tl-arrow.warp {
180 margin-left: 1px;
181 border-width: 3px 0;
182
--- src/default_css.txt
+++ src/default_css.txt
@@ -172,10 +172,11 @@
172 border-left: 3px solid #000;
173 }
174 .tl-line.cherrypick {
175 width: 0px;
176 border-top: 1px dashed #000;
177 border-left: 1px dashed #000;
178 background: #fff;
179 }
180 .tl-arrow.warp {
181 margin-left: 1px;
182 border-width: 3px 0;
183
+5 -4
--- src/graph.js
+++ src/graph.js
@@ -244,19 +244,20 @@
244244
if( p.hasOwnProperty('mo') ){
245245
var x0 = p.x + node.w/2;
246246
var x1 = p.mo*railPitch + node.w/2;
247247
var u = tx.rowinfo[p.mu-tx.iTopRow];
248248
var y1 = miLineY(u);
249
+ var drawMethod = (p.f&2) ? drawCherrypickLine : drawMergeLine;
249250
if( p.u<0 || p.mo!=p.r ){
250251
x1 += mergeLines[p.mo] = -mLine.w/2;
251252
var y0 = p.y+2;
252
- if( p.r!=p.mo ) drawMergeLine(x0,y0,x1+(x0<x1 ? mLine.w : 0),null);
253
- drawMergeLine(x1,y0+mLine.w,null,y1);
253
+ if( p.r!=p.mo ) drawMethod(x0,y0,x1+(x0<x1 ? mLine.w : 0),null);
254
+ drawMethod(x1,y0+mLine.w,null,y1);
254255
}else if( mergeOffset ){
255256
mergeLines[p.mo] = u.r<p.r ? -mergeOffset-mLine.w : mergeOffset;
256257
x1 += mergeLines[p.mo];
257
- drawMergeLine(x1,p.y+node.h/2,null,y1);
258
+ drawMethod(x1,p.y+node.h/2,null,y1);
258259
}else{
259260
delete mergeLines[p.mo];
260261
}
261262
}
262263
if( p.hasOwnProperty('au') ){
@@ -302,11 +303,11 @@
302303
var rail = p.cpi[i];
303304
if( rail<0 ){
304305
rail = -rail;
305306
mergeLines[rail] = -mLine.w/2;
306307
var x = rail*railPitch + (node.w-mLine.w)/2;
307
- drawMergeLine(x,miLineY(p),null,btm);
308
+ drawCherrypickLine(x,miLineY(p),null,btm);
308309
}
309310
drawMergeArrow(p,rail,1);
310311
}
311312
}
312313
}
313314
--- src/graph.js
+++ src/graph.js
@@ -244,19 +244,20 @@
244 if( p.hasOwnProperty('mo') ){
245 var x0 = p.x + node.w/2;
246 var x1 = p.mo*railPitch + node.w/2;
247 var u = tx.rowinfo[p.mu-tx.iTopRow];
248 var y1 = miLineY(u);
 
249 if( p.u<0 || p.mo!=p.r ){
250 x1 += mergeLines[p.mo] = -mLine.w/2;
251 var y0 = p.y+2;
252 if( p.r!=p.mo ) drawMergeLine(x0,y0,x1+(x0<x1 ? mLine.w : 0),null);
253 drawMergeLine(x1,y0+mLine.w,null,y1);
254 }else if( mergeOffset ){
255 mergeLines[p.mo] = u.r<p.r ? -mergeOffset-mLine.w : mergeOffset;
256 x1 += mergeLines[p.mo];
257 drawMergeLine(x1,p.y+node.h/2,null,y1);
258 }else{
259 delete mergeLines[p.mo];
260 }
261 }
262 if( p.hasOwnProperty('au') ){
@@ -302,11 +303,11 @@
302 var rail = p.cpi[i];
303 if( rail<0 ){
304 rail = -rail;
305 mergeLines[rail] = -mLine.w/2;
306 var x = rail*railPitch + (node.w-mLine.w)/2;
307 drawMergeLine(x,miLineY(p),null,btm);
308 }
309 drawMergeArrow(p,rail,1);
310 }
311 }
312 }
313
--- src/graph.js
+++ src/graph.js
@@ -244,19 +244,20 @@
244 if( p.hasOwnProperty('mo') ){
245 var x0 = p.x + node.w/2;
246 var x1 = p.mo*railPitch + node.w/2;
247 var u = tx.rowinfo[p.mu-tx.iTopRow];
248 var y1 = miLineY(u);
249 var drawMethod = (p.f&2) ? drawCherrypickLine : drawMergeLine;
250 if( p.u<0 || p.mo!=p.r ){
251 x1 += mergeLines[p.mo] = -mLine.w/2;
252 var y0 = p.y+2;
253 if( p.r!=p.mo ) drawMethod(x0,y0,x1+(x0<x1 ? mLine.w : 0),null);
254 drawMethod(x1,y0+mLine.w,null,y1);
255 }else if( mergeOffset ){
256 mergeLines[p.mo] = u.r<p.r ? -mergeOffset-mLine.w : mergeOffset;
257 x1 += mergeLines[p.mo];
258 drawMethod(x1,p.y+node.h/2,null,y1);
259 }else{
260 delete mergeLines[p.mo];
261 }
262 }
263 if( p.hasOwnProperty('au') ){
@@ -302,11 +303,11 @@
303 var rail = p.cpi[i];
304 if( rail<0 ){
305 rail = -rail;
306 mergeLines[rail] = -mLine.w/2;
307 var x = rail*railPitch + (node.w-mLine.w)/2;
308 drawCherrypickLine(x,miLineY(p),null,btm);
309 }
310 drawMergeArrow(p,rail,1);
311 }
312 }
313 }
314
+5 -1
--- src/timeline.c
+++ src/timeline.c
@@ -875,10 +875,11 @@
875875
** Only exists if "mo" exists.
876876
** u: Draw a thick child-line out of the top of this node and up to
877877
** the node with an id equal to this value. 0 if it is straight to
878878
** the top of the page, -1 if there is no thick-line riser.
879879
** f: 0x01: a leaf node.
880
+ ** 0x02: all output merges are cherrypicks
880881
** au: An array of integers that define thick-line risers for branches.
881882
** The integers are in pairs. For each pair, the first integer is
882883
** is the rail on which the riser should run and the second integer
883884
** is the id of the node upto which the riser should run. If there
884885
** are no risers, this array does not exist.
@@ -903,11 +904,14 @@
903904
if( pRow->mergeOut>=0 ){
904905
cgi_printf("\"mo\":%d,", pRow->mergeOut);
905906
cgi_printf("\"mu\":%d,", pRow->mergeUpto);
906907
}
907908
cgi_printf("\"u\":%d,", pRow->aiRiser[pRow->iRail]);
908
- cgi_printf("\"f\":%d,", pRow->isLeaf ? 1 : 0);
909
+ k = 0;
910
+ if( pRow->isLeaf ) k |= 1;
911
+ if( pRow->nCherrypick>=pRow->nParent-1 ) k |= 2;
912
+ cgi_printf("\"f\":%d,",k);
909913
for(i=k=0; i<GR_MAX_RAIL; i++){
910914
if( i==pRow->iRail ) continue;
911915
if( pRow->aiRiser[i]>0 ){
912916
if( k==0 ){
913917
cgi_printf("\"au\":");
914918
--- src/timeline.c
+++ src/timeline.c
@@ -875,10 +875,11 @@
875 ** Only exists if "mo" exists.
876 ** u: Draw a thick child-line out of the top of this node and up to
877 ** the node with an id equal to this value. 0 if it is straight to
878 ** the top of the page, -1 if there is no thick-line riser.
879 ** f: 0x01: a leaf node.
 
880 ** au: An array of integers that define thick-line risers for branches.
881 ** The integers are in pairs. For each pair, the first integer is
882 ** is the rail on which the riser should run and the second integer
883 ** is the id of the node upto which the riser should run. If there
884 ** are no risers, this array does not exist.
@@ -903,11 +904,14 @@
903 if( pRow->mergeOut>=0 ){
904 cgi_printf("\"mo\":%d,", pRow->mergeOut);
905 cgi_printf("\"mu\":%d,", pRow->mergeUpto);
906 }
907 cgi_printf("\"u\":%d,", pRow->aiRiser[pRow->iRail]);
908 cgi_printf("\"f\":%d,", pRow->isLeaf ? 1 : 0);
 
 
 
909 for(i=k=0; i<GR_MAX_RAIL; i++){
910 if( i==pRow->iRail ) continue;
911 if( pRow->aiRiser[i]>0 ){
912 if( k==0 ){
913 cgi_printf("\"au\":");
914
--- src/timeline.c
+++ src/timeline.c
@@ -875,10 +875,11 @@
875 ** Only exists if "mo" exists.
876 ** u: Draw a thick child-line out of the top of this node and up to
877 ** the node with an id equal to this value. 0 if it is straight to
878 ** the top of the page, -1 if there is no thick-line riser.
879 ** f: 0x01: a leaf node.
880 ** 0x02: all output merges are cherrypicks
881 ** au: An array of integers that define thick-line risers for branches.
882 ** The integers are in pairs. For each pair, the first integer is
883 ** is the rail on which the riser should run and the second integer
884 ** is the id of the node upto which the riser should run. If there
885 ** are no risers, this array does not exist.
@@ -903,11 +904,14 @@
904 if( pRow->mergeOut>=0 ){
905 cgi_printf("\"mo\":%d,", pRow->mergeOut);
906 cgi_printf("\"mu\":%d,", pRow->mergeUpto);
907 }
908 cgi_printf("\"u\":%d,", pRow->aiRiser[pRow->iRail]);
909 k = 0;
910 if( pRow->isLeaf ) k |= 1;
911 if( pRow->nCherrypick>=pRow->nParent-1 ) k |= 2;
912 cgi_printf("\"f\":%d,",k);
913 for(i=k=0; i<GR_MAX_RAIL; i++){
914 if( i==pRow->iRail ) continue;
915 if( pRow->aiRiser[i]>0 ){
916 if( k==0 ){
917 cgi_printf("\"au\":");
918

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button