| | @@ -614,17 +614,16 @@ |
| 614 | 614 | char cSep; |
| 615 | 615 | int mergeOffset; /* Pixel offset from rail to merge riser */ |
| 616 | 616 | int iRailPitch; /* Pixels between consecutive rails */ |
| 617 | 617 | int showArrowheads; /* True to draw arrowheads. False to omit. */ |
| 618 | 618 | int circleNodes; /* True for circle nodes. False for square nodes */ |
| 619 | | - int multicolorLines; /* Use colors for graph lines */ |
| 619 | + int colorGraph; /* Use colors for graph lines */ |
| 620 | 620 | |
| 621 | 621 | iRailPitch = pGraph->iRailPitch; |
| 622 | 622 | showArrowheads = skin_detail_boolean("timeline-arrowheads"); |
| 623 | 623 | circleNodes = skin_detail_boolean("timeline-circle-nodes"); |
| 624 | | - multicolorLines = skin_detail_boolean("timeline-multicolor"); |
| 625 | | - (void)multicolorLines; /* Not currently used */ |
| 624 | + colorGraph = skin_detail_boolean("timeline-color-graph-lines"); |
| 626 | 625 | |
| 627 | 626 | /* Number of pixels that the thin merge lines are offset from the |
| 628 | 627 | ** the center of the think rail lines. If zero, then the vertical |
| 629 | 628 | ** merge lines overlap with the thicker rail lines. |
| 630 | 629 | */ |
| | @@ -697,12 +696,16 @@ |
| 697 | 696 | cgi_printf("%c%d,%d", cSep, i, pRow->aiRiser[i]); |
| 698 | 697 | cSep = ','; |
| 699 | 698 | } |
| 700 | 699 | } |
| 701 | 700 | if( cSep=='[' ) cgi_printf("["); |
| 702 | | - cgi_printf("],mi:"); |
| 701 | + cgi_printf("],"); |
| 702 | + if( colorGraph && pRow->zBgClr[0]=='#' ){ |
| 703 | + cgi_printf("fg:\"%s\",", pRow->zBgClr); |
| 704 | + } |
| 703 | 705 | /* mi */ |
| 706 | + cgi_printf("mi:"); |
| 704 | 707 | cSep = '['; |
| 705 | 708 | for(i=0; i<GR_MAX_RAIL; i++){ |
| 706 | 709 | if( pRow->mergeIn[i] ){ |
| 707 | 710 | int mi = i*iRailPitch; |
| 708 | 711 | if( pRow->mergeIn[i]==1 ) mi -= mergeOffset-1; |
| | @@ -760,12 +763,12 @@ |
| 760 | 763 | @ }while( obj = obj.offsetParent ); |
| 761 | 764 | @ } |
| 762 | 765 | @ return left; |
| 763 | 766 | @ } |
| 764 | 767 | if( showArrowheads ){ |
| 765 | | - @ function drawUpArrow(x,y0,y1){ |
| 766 | | - @ drawBox(lineClr,x,y0+4,x+1,y1); |
| 768 | + @ function drawUpArrow(x,y0,y1,clr){ |
| 769 | + @ drawBox(clr,x,y0+4,x+1,y1); |
| 767 | 770 | @ var n = document.createElement("div"), |
| 768 | 771 | @ l = x-2, |
| 769 | 772 | @ t = y0; |
| 770 | 773 | @ n.style.position = "absolute"; |
| 771 | 774 | @ n.style.left = l+"px"; |
| | @@ -775,22 +778,22 @@ |
| 775 | 778 | @ n.style.transform = "scale(.999)"; |
| 776 | 779 | @ n.style.borderWidth = 0; |
| 777 | 780 | @ n.style.borderStyle = "solid"; |
| 778 | 781 | @ n.style.borderColor = "transparent"; |
| 779 | 782 | @ n.style.borderRightWidth = "3px"; |
| 780 | | - @ n.style.borderBottomColor = lineClr; |
| 783 | + @ n.style.borderBottomColor = clr; |
| 781 | 784 | @ n.style.borderLeftWidth = "3px"; |
| 782 | 785 | @ if( y0+10>=y1 ){ |
| 783 | 786 | @ n.style.borderBottomWidth = "5px"; |
| 784 | 787 | @ } else { |
| 785 | 788 | @ n.style.borderBottomWidth = "7px"; |
| 786 | 789 | @ } |
| 787 | 790 | @ cDiv.appendChild(n); |
| 788 | 791 | @ } |
| 789 | 792 | }else{ |
| 790 | | - @ function drawUpArrow(x,y0,y1){ |
| 791 | | - @ drawBox(lineClr,x,y0+1,x+1,y1); |
| 793 | + @ function drawUpArrow(x,y0,y1,clr){ |
| 794 | + @ drawBox(clr,x,y0+1,x+1,y1); |
| 792 | 795 | @ } |
| 793 | 796 | } |
| 794 | 797 | @ function drawThinArrow(y,xFrom,xTo){ |
| 795 | 798 | @ var n = document.createElement("div"), |
| 796 | 799 | @ t = y-2; |
| | @@ -828,15 +831,15 @@ |
| 828 | 831 | } |
| 829 | 832 | @ } |
| 830 | 833 | @ function drawNode(p, left, btm){ |
| 831 | 834 | @ drawNodeBox(boxColor,p.x-5,p.y-5,p.x+6,p.y+6); |
| 832 | 835 | @ drawNodeBox(p.bg||bgClr,p.x-4,p.y-4,p.x+5,p.y+5); |
| 833 | | - @ if( p.u>0 ) drawUpArrow(p.x, rowinfo[p.u-1].y+6, p.y-5); |
| 836 | + @ if( p.u>0 ) drawUpArrow(p.x,rowinfo[p.u-1].y+6,p.y-6,p.fg||lineClr); |
| 834 | 837 | @ if( p.f&1 ) drawNodeBox(boxColor,p.x-1,p.y-1,p.x+2,p.y+2); |
| 835 | 838 | if( !omitDescenders ){ |
| 836 | | - @ if( p.u==0 ) drawUpArrow(p.x, 0, p.y-5); |
| 837 | | - @ if( p.d ) drawUpArrow(p.x, p.y+6, btm); |
| 839 | + @ if( p.u==0 ) drawUpArrow(p.x,0,p.y-6,p.fg||lineClr); |
| 840 | + @ if( p.d ) drawUpArrow(p.x,p.y+6,btm,p.fg||lineClr); |
| 838 | 841 | } |
| 839 | 842 | @ if( p.mo>0 ){ |
| 840 | 843 | @ var x1 = p.mo + left - 1; |
| 841 | 844 | @ var y1 = p.y-3; |
| 842 | 845 | @ var x0 = x1>p.x ? p.x+7 : p.x-6; |
| | @@ -855,11 +858,11 @@ |
| 855 | 858 | @ var x1 = p.au[i]*railPitch + left; |
| 856 | 859 | @ var x0 = x1>p.x ? p.x+7 : p.x-6; |
| 857 | 860 | @ var u = rowinfo[p.au[i+1]-1]; |
| 858 | 861 | @ if(u.id<p.id){ |
| 859 | 862 | @ drawBox(lineClr,x0,p.y,x1+1,p.y+1); |
| 860 | | - @ drawUpArrow(x1, u.y+6, p.y); |
| 863 | + @ drawUpArrow(x1,u.y+6,p.y,p.fg||lineClr); |
| 861 | 864 | @ }else{ |
| 862 | 865 | @ drawBox("#600000",x0,p.y,x1,p.y+1); |
| 863 | 866 | @ drawBox("#600000",x1-1,p.y,x1,u.y+1); |
| 864 | 867 | @ drawBox("#600000",x1,u.y,u.x-10,u.y+1); |
| 865 | 868 | @ var n = document.createElement("div"), |
| 866 | 869 | |