| | @@ -273,11 +273,11 @@ |
| 273 | 273 | if( db_step(&qbranch)==SQLITE_ROW ){ |
| 274 | 274 | zBr = db_column_text(&qbranch, 0); |
| 275 | 275 | }else{ |
| 276 | 276 | zBr = "trunk"; |
| 277 | 277 | } |
| 278 | | - gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr); |
| 278 | + gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr); |
| 279 | 279 | db_reset(&qbranch); |
| 280 | 280 | @ <div id="m%d(gidx)"></div> |
| 281 | 281 | } |
| 282 | 282 | if( zBgClr && zBgClr[0] ){ |
| 283 | 283 | @ <td valign="top" align="left" bgcolor="%h(zBgClr)"> |
| | @@ -369,12 +369,13 @@ |
| 369 | 369 | int i; |
| 370 | 370 | char cSep; |
| 371 | 371 | @ <script type="text/JavaScript"> |
| 372 | 372 | cgi_printf("var rowinfo = [\n"); |
| 373 | 373 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 374 | | - cgi_printf("{id:\"m%d\",r:%d,d:%d,mo:%d,mu:%d,u:%d,au:", |
| 374 | + cgi_printf("{id:\"m%d\",bg:\"%s\",r:%d,d:%d,mo:%d,mu:%d,u:%d,au:", |
| 375 | 375 | pRow->idx, |
| 376 | + pRow->zBgClr, |
| 376 | 377 | pRow->iRail, |
| 377 | 378 | pRow->bDescender, |
| 378 | 379 | pRow->mergeOut, |
| 379 | 380 | pRow->mergeUpto, |
| 380 | 381 | pRow->aiRaiser[pRow->iRail] |
| | @@ -464,11 +465,11 @@ |
| 464 | 465 | @ function drawThinLine(x0,y0,x1,y1){ |
| 465 | 466 | @ drawBox("black",x0,y0,x1,y1); |
| 466 | 467 | @ } |
| 467 | 468 | @ function drawNode(p, left, btm){ |
| 468 | 469 | @ drawBox("black",p.x-5,p.y-5,p.x+6,p.y+6); |
| 469 | | - @ drawBox("white",p.x-4,p.y-4,p.x+5,p.y+5); |
| 470 | + @ drawBox(p.bg,p.x-4,p.y-4,p.x+5,p.y+5); |
| 470 | 471 | @ if( p.u>0 ){ |
| 471 | 472 | @ var u = rowinfo[p.u-1]; |
| 472 | 473 | @ drawUpArrow(p.x, u.y+6, p.y-5); |
| 473 | 474 | @ } |
| 474 | 475 | @ if( p.d ){ |
| | @@ -525,18 +526,14 @@ |
| 525 | 526 | @ var context; |
| 526 | 527 | @ if( realCanvas && realCanvas.getContext |
| 527 | 528 | @ && (context = realCanvas.getContext('2d'))) { |
| 528 | 529 | @ drawBox = function(color,x0,y0,x1,y1) { |
| 529 | 530 | @ if( y0>32767 || y1>32767 ) return; |
| 530 | | - @ var colors = { |
| 531 | | - @ 'white':'rgba(255,255,255,1)', |
| 532 | | - @ 'black':'rgba(0,0,0,1)' |
| 533 | | - @ }; |
| 534 | 531 | @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } |
| 535 | 532 | @ if( y0>y1 ){ var t=y0; y0=y1; y1=t; } |
| 536 | 533 | @ if(isNaN(x0) || isNaN(y0) || isNaN(x1) || isNaN(y1)) return; |
| 537 | | - @ context.fillStyle = colors[color]; |
| 534 | + @ context.fillStyle = color; |
| 538 | 535 | @ context.fillRect(x0-left+5,y0,x1-x0+1,y1-y0+1); |
| 539 | 536 | @ }; |
| 540 | 537 | @ } |
| 541 | 538 | @ for(var i in rowinfo){ |
| 542 | 539 | @ drawNode(rowinfo[i], left, btm); |
| 543 | 540 | |