| | @@ -612,11 +612,19 @@ |
| 612 | 612 | GraphRow *pRow; |
| 613 | 613 | int i; |
| 614 | 614 | char cSep; |
| 615 | 615 | int mergeOffset; /* Pixel offset from rail to merge riser */ |
| 616 | 616 | int iRailPitch; /* Pixels between consecutive rails */ |
| 617 | + int showArrowheads; /* True to draw arrowheads. False to omit. */ |
| 618 | + int circleNodes; /* True for circle nodes. False for square nodes */ |
| 619 | + int multicolorLines; /* Use colors for graph lines */ |
| 620 | + |
| 617 | 621 | iRailPitch = pGraph->iRailPitch; |
| 622 | + showArrowheads = skin_detail_boolean("timeline-arrowheads"); |
| 623 | + circleNodes = skin_detail_boolean("timeline-circle-nodes"); |
| 624 | + multicolorLines = skin_detail_boolean("timeline-multicolor"); |
| 625 | + (void)multicolorLines; /* Not currently used */ |
| 618 | 626 | |
| 619 | 627 | /* Number of pixels that the thin merge lines are offset from the |
| 620 | 628 | ** the center of the think rail lines. If zero, then the vertical |
| 621 | 629 | ** merge lines overlap with the thicker rail lines. |
| 622 | 630 | */ |
| | @@ -751,34 +759,40 @@ |
| 751 | 759 | @ left += obj.offsetLeft; |
| 752 | 760 | @ }while( obj = obj.offsetParent ); |
| 753 | 761 | @ } |
| 754 | 762 | @ return left; |
| 755 | 763 | @ } |
| 756 | | - @ function drawUpArrow(x,y0,y1){ |
| 757 | | - @ drawBox(lineClr,x,y0+4,x+1,y1); |
| 758 | | - @ var n = document.createElement("div"), |
| 759 | | - @ l = x-2, |
| 760 | | - @ t = y0; |
| 761 | | - @ n.style.position = "absolute"; |
| 762 | | - @ n.style.left = l+"px"; |
| 763 | | - @ n.style.top = t+"px"; |
| 764 | | - @ n.style.width = 0; |
| 765 | | - @ n.style.height = 0; |
| 766 | | - @ n.style.transform = "scale(.999)"; |
| 767 | | - @ n.style.borderWidth = 0; |
| 768 | | - @ n.style.borderStyle = "solid"; |
| 769 | | - @ n.style.borderColor = "transparent"; |
| 770 | | - @ n.style.borderRightWidth = "3px"; |
| 771 | | - @ n.style.borderBottomColor = lineClr; |
| 772 | | - @ n.style.borderLeftWidth = "3px"; |
| 773 | | - @ if( y0+10>=y1 ){ |
| 774 | | - @ n.style.borderBottomWidth = "5px"; |
| 775 | | - @ } else { |
| 776 | | - @ n.style.borderBottomWidth = "7px"; |
| 777 | | - @ } |
| 778 | | - @ cDiv.appendChild(n); |
| 779 | | - @ } |
| 764 | + if( showArrowheads ){ |
| 765 | + @ function drawUpArrow(x,y0,y1){ |
| 766 | + @ drawBox(lineClr,x,y0+4,x+1,y1); |
| 767 | + @ var n = document.createElement("div"), |
| 768 | + @ l = x-2, |
| 769 | + @ t = y0; |
| 770 | + @ n.style.position = "absolute"; |
| 771 | + @ n.style.left = l+"px"; |
| 772 | + @ n.style.top = t+"px"; |
| 773 | + @ n.style.width = 0; |
| 774 | + @ n.style.height = 0; |
| 775 | + @ n.style.transform = "scale(.999)"; |
| 776 | + @ n.style.borderWidth = 0; |
| 777 | + @ n.style.borderStyle = "solid"; |
| 778 | + @ n.style.borderColor = "transparent"; |
| 779 | + @ n.style.borderRightWidth = "3px"; |
| 780 | + @ n.style.borderBottomColor = lineClr; |
| 781 | + @ n.style.borderLeftWidth = "3px"; |
| 782 | + @ if( y0+10>=y1 ){ |
| 783 | + @ n.style.borderBottomWidth = "5px"; |
| 784 | + @ } else { |
| 785 | + @ n.style.borderBottomWidth = "7px"; |
| 786 | + @ } |
| 787 | + @ cDiv.appendChild(n); |
| 788 | + @ } |
| 789 | + }else{ |
| 790 | + @ function drawUpArrow(x,y0,y1){ |
| 791 | + @ drawBox(lineClr,x,y0+1,x+1,y1); |
| 792 | + @ } |
| 793 | + } |
| 780 | 794 | @ function drawThinArrow(y,xFrom,xTo){ |
| 781 | 795 | @ var n = document.createElement("div"), |
| 782 | 796 | @ t = y-2; |
| 783 | 797 | @ n.style.position = "absolute"; |
| 784 | 798 | @ n.style.top = t+"px"; |
| | @@ -805,11 +819,15 @@ |
| 805 | 819 | @ } |
| 806 | 820 | @ function drawThinLine(x0,y0,x1,y1){ |
| 807 | 821 | @ drawBox(lineClr,x0,y0,x1,y1); |
| 808 | 822 | @ } |
| 809 | 823 | @ function drawNodeBox(color,x0,y0,x1,y1){ |
| 810 | | - @ drawBox(color,x0,y0,x1,y1).style.cursor = "pointer"; |
| 824 | + @ var n = drawBox(color,x0,y0,x1,y1); |
| 825 | + @ n.style.cursor = "pointer"; |
| 826 | + if( circleNodes ){ |
| 827 | + @ n.style.borderRadius = "6px"; |
| 828 | + } |
| 811 | 829 | @ } |
| 812 | 830 | @ function drawNode(p, left, btm){ |
| 813 | 831 | @ drawNodeBox(boxColor,p.x-5,p.y-5,p.x+6,p.y+6); |
| 814 | 832 | @ drawNodeBox(p.bg||bgClr,p.x-4,p.y-4,p.x+5,p.y+5); |
| 815 | 833 | @ if( p.u>0 ) drawUpArrow(p.x, rowinfo[p.u-1].y+6, p.y-5); |
| | @@ -924,10 +942,13 @@ |
| 924 | 942 | @ } |
| 925 | 943 | @ } |
| 926 | 944 | @ function clickOnRow(p){ |
| 927 | 945 | @ if( selRow==null ){ |
| 928 | 946 | @ selBox = drawBox("red",p.x-2,p.y-2,p.x+3,p.y+3); |
| 947 | + if( circleNodes ){ |
| 948 | + @ selBox.style.borderRadius="6px"; |
| 949 | + } |
| 929 | 950 | @ selRow = p; |
| 930 | 951 | @ }else if( selRow==p ){ |
| 931 | 952 | @ var canvasDiv = gebi("canvas"); |
| 932 | 953 | @ canvasDiv.removeChild(selBox); |
| 933 | 954 | @ selBox = null; |
| 934 | 955 | |