Fossil SCM

Always generate timeline-data for a timeline even if the table has no check-ins and thus no graph. This causes the timeline-data scanner to continue looking for subsequent timelines.

drh 2017-12-13 17:17 trunk
Commit 3f316764921b4eda9fb32f2b4c91fb81bf35e6094b985fb9f7e57d91d6aa425e
2 files changed +1 -1 +6 -2
+1 -1
--- src/graph.js
+++ src/graph.js
@@ -382,8 +382,8 @@
382382
for(i=0; 1; i++){
383383
var dataObj = document.getElementById("timeline-data-"+i);
384384
if(!dataObj) break;
385385
var txJson = dataObj.textContent || dataObj.innerText;
386386
var tx = JSON.parse(txJson);
387
- TimelineGraph(tx);
387
+ if(tx.rowinfo) TimelineGraph(tx);
388388
}
389389
}())
390390
--- src/graph.js
+++ src/graph.js
@@ -382,8 +382,8 @@
382 for(i=0; 1; i++){
383 var dataObj = document.getElementById("timeline-data-"+i);
384 if(!dataObj) break;
385 var txJson = dataObj.textContent || dataObj.innerText;
386 var tx = JSON.parse(txJson);
387 TimelineGraph(tx);
388 }
389 }())
390
--- src/graph.js
+++ src/graph.js
@@ -382,8 +382,8 @@
382 for(i=0; 1; i++){
383 var dataObj = document.getElementById("timeline-data-"+i);
384 if(!dataObj) break;
385 var txJson = dataObj.textContent || dataObj.innerText;
386 var tx = JSON.parse(txJson);
387 if(tx.rowinfo) TimelineGraph(tx);
388 }
389 }())
390
+6 -2
--- src/timeline.c
+++ src/timeline.c
@@ -776,11 +776,11 @@
776776
void timeline_output_graph_javascript(
777777
GraphContext *pGraph, /* The graph to be displayed */
778778
int tmFlags, /* Flags that control rendering */
779779
int iTableId /* Which graph is this for */
780780
){
781
- if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
781
+ if( pGraph && pGraph->nErr==0 ){
782782
GraphRow *pRow;
783783
int i;
784784
char cSep;
785785
int iRailPitch; /* Pixels between consecutive rails */
786786
int showArrowheads; /* True to draw arrowheads. False to omit. */
@@ -810,11 +810,15 @@
810810
@ "omitDescenders": %d(omitDescenders),
811811
@ "fileDiff": %d(fileDiff),
812812
@ "scrollToSelect": %d(scrollToSelect),
813813
@ "nrail": %d(pGraph->mxRail+1),
814814
@ "baseUrl": "%R",
815
- @ "rowinfo": [
815
+ if( pGraph->nRow==0 ){
816
+ @ "rowinfo": null
817
+ }else{
818
+ @ "rowinfo": [
819
+ }
816820
817821
/* the rowinfo[] array contains all the information needed to generate
818822
** the graph. Each entry contains information for a single row:
819823
**
820824
** id: The id of the <div> element for the row. This is an integer.
821825
--- src/timeline.c
+++ src/timeline.c
@@ -776,11 +776,11 @@
776 void timeline_output_graph_javascript(
777 GraphContext *pGraph, /* The graph to be displayed */
778 int tmFlags, /* Flags that control rendering */
779 int iTableId /* Which graph is this for */
780 ){
781 if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
782 GraphRow *pRow;
783 int i;
784 char cSep;
785 int iRailPitch; /* Pixels between consecutive rails */
786 int showArrowheads; /* True to draw arrowheads. False to omit. */
@@ -810,11 +810,15 @@
810 @ "omitDescenders": %d(omitDescenders),
811 @ "fileDiff": %d(fileDiff),
812 @ "scrollToSelect": %d(scrollToSelect),
813 @ "nrail": %d(pGraph->mxRail+1),
814 @ "baseUrl": "%R",
815 @ "rowinfo": [
 
 
 
 
816
817 /* the rowinfo[] array contains all the information needed to generate
818 ** the graph. Each entry contains information for a single row:
819 **
820 ** id: The id of the <div> element for the row. This is an integer.
821
--- src/timeline.c
+++ src/timeline.c
@@ -776,11 +776,11 @@
776 void timeline_output_graph_javascript(
777 GraphContext *pGraph, /* The graph to be displayed */
778 int tmFlags, /* Flags that control rendering */
779 int iTableId /* Which graph is this for */
780 ){
781 if( pGraph && pGraph->nErr==0 ){
782 GraphRow *pRow;
783 int i;
784 char cSep;
785 int iRailPitch; /* Pixels between consecutive rails */
786 int showArrowheads; /* True to draw arrowheads. False to omit. */
@@ -810,11 +810,15 @@
810 @ "omitDescenders": %d(omitDescenders),
811 @ "fileDiff": %d(fileDiff),
812 @ "scrollToSelect": %d(scrollToSelect),
813 @ "nrail": %d(pGraph->mxRail+1),
814 @ "baseUrl": "%R",
815 if( pGraph->nRow==0 ){
816 @ "rowinfo": null
817 }else{
818 @ "rowinfo": [
819 }
820
821 /* the rowinfo[] array contains all the information needed to generate
822 ** the graph. Each entry contains information for a single row:
823 **
824 ** id: The id of the <div> element for the row. This is an integer.
825

Keyboard Shortcuts

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