Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Further minor tweaks to the graph drawing javascript. New graph test cases added. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
ddc3d3d19cf3b30f07e5dc09db4b4e43 |
| User & Date: | drh 2010-12-30 21:03:05.000 |
Context
|
2010-12-30
| ||
| 21:26 | Improvements to the merge-out arrows on the graph. It is now more likely to draw the merge arrow up out of a leaf node. ... (check-in: 4614dadbcb user: drh tags: trunk) | |
| 21:03 | Further minor tweaks to the graph drawing javascript. New graph test cases added. ... (check-in: ddc3d3d19c user: drh tags: trunk) | |
| 20:37 | Clean up to the graph generator. Add comments describing variables in the javascript. Omit merge descenders if parent descenders are omitted. Add a test page of URL links. ... (check-in: 94979bc7e3 user: drh tags: trunk) | |
Changes
Changes to src/timeline.c.
| ︙ | ︙ | |||
360 361 362 363 364 365 366 |
** to get an actual id, prepend "m" to the integer. The top node
** is 1 and numbers increase moving down the timeline.
** bg: The background color for this row
** r: The "rail" that the node for this row sits on. The left-most
** rail is 0 and the number increases to the right.
** d: True if there is a "descender" - an arrow coming from the bottom
** of the page straight up to this node.
| | | | 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
** to get an actual id, prepend "m" to the integer. The top node
** is 1 and numbers increase moving down the timeline.
** bg: The background color for this row
** r: The "rail" that the node for this row sits on. The left-most
** rail is 0 and the number increases to the right.
** d: True if there is a "descender" - an arrow coming from the bottom
** of the page straight up to this node.
** mo: "merge-out". If non-zero, this is one more than the rail on which
** a merge arrow travels upward. The merge arrow is drawn upwards
** to the row identified by mu:. If this value is zero then
** 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.
** md: A bitmask of rails on which merge-arrow descenders should be
** drawn from this row to the bottom of the page. The least
** significant bit (1) corresponds to rail 0. The 2-bit corresponds
** to rail 1. And so forth. This value is 0 if there are no
** merge-arrow descenders.
|
| ︙ | ︙ | |||
387 388 389 390 391 392 393 |
cgi_printf("var rowinfo = [\n");
for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){
cgi_printf("{id:%d,bg:\"%s\",r:%d,d:%d,mo:%d,mu:%d,md:%u,u:%d,au:",
pRow->idx,
pRow->zBgClr,
pRow->iRail,
pRow->bDescender,
| | | 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
cgi_printf("var rowinfo = [\n");
for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){
cgi_printf("{id:%d,bg:\"%s\",r:%d,d:%d,mo:%d,mu:%d,md:%u,u:%d,au:",
pRow->idx,
pRow->zBgClr,
pRow->iRail,
pRow->bDescender,
pRow->mergeOut+1,
pRow->mergeUpto,
pRow->mergeDown,
pRow->aiRiser[pRow->iRail]
);
cSep = '[';
for(i=0; i<GR_MAX_RAIL; i++){
if( i==pRow->iRail ) continue;
|
| ︙ | ︙ | |||
487 488 489 490 491 492 493 |
@ if( p.u>0 ){
@ var u = rowinfo[p.u-1];
@ drawUpArrow(p.x, u.y+6, p.y-5);
@ }
@ if( p.d ){
@ drawUpArrow(p.x, p.y+6, btm);
@ }
| | | | 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 |
@ if( p.u>0 ){
@ var u = rowinfo[p.u-1];
@ drawUpArrow(p.x, u.y+6, p.y-5);
@ }
@ if( p.d ){
@ drawUpArrow(p.x, p.y+6, btm);
@ }
@ if( p.mo>0 ){
@ var x1 = (p.mo-1)*20 + left;
@ var y1 = p.y-3;
@ var x0 = x1>p.x ? p.x+7 : p.x-6;
@ var u = rowinfo[p.mu-1];
@ var y0 = u.y+5;
@ if( x1==p.x ){
@ y1 -= 2;
@ }else{
|
| ︙ | ︙ |
Changes to test/graph-test-1.wiki.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <title>Graph Test One</title> This page contains examples a list of URLs of timelines with interesting graphs. Click on all URLs, one by one, to verify the correct operation of the graph drawing logic. * [/timeline?n=20&y=ci&b=2010-11-08] * [/timeline?n=40&y=ci&b=2010-11-08] * [/timeline?n=1000&y=ci&b=2010-11-08] * [/timeline?f=3ea66260b5555d2e] * [/timeline?r=experimental] * [/timeline?r=experimental&n=1000] * [/timeline?r=creole] * [/timeline?t=creole] * [/timeline?t=release] * [/timeline?r=release] * [/finfo?name=Makefile] | > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
<title>Graph Test One</title>
This page contains examples a list of URLs of timelines with
interesting graphs. Click on all URLs, one by one, to verify
the correct operation of the graph drawing logic.
* [/timeline?n=20&y=ci&b=2010-11-08]
* [/timeline?n=40&y=ci&b=2010-11-08]
* [/timeline?n=1000&y=ci&b=2010-11-08]
* [/timeline?f=3ea66260b5555d2e]
* [/timeline?d=e5fe4164f74a7576&p=e5fe4164f74a7576&n=3] -
multiple merge descenders from the penultimate node.
* [/timeline?y=ci&a=2010-12-20] - multiple branch risers.
* [/timeline?y=ci&a=2010-12-20&n=18]
* [/timeline?y=ci&a=2010-12-20&n=9]
* [/timeline?r=experimental]
* [/timeline?r=experimental&n=1000]
* [/timeline?r=creole]
* [/timeline?t=creole]
* [/timeline?t=release]
* [/timeline?r=release]
* [/finfo?name=Makefile]
|
| ︙ | ︙ |