Fossil SCM

Fix display of timeline graph in IE8, broken by commit [e412f97999]

jan.nijtmans 2013-08-16 08:17 trunk merge
Commit 5885241f52c6182e92368b19d0da892bb61f9a01
2 files changed +3 -3 +3 -3
+3 -3
--- src/timeline.c
+++ src/timeline.c
@@ -649,13 +649,13 @@
649649
cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n");
650650
}
651651
cgi_printf("var nrail = %d\n", pGraph->mxRail+1);
652652
graph_free(pGraph);
653653
@ var canvasDiv = gebi("canvas");
654
- @ var canvasStyle = window.getComputedStyle(canvasDiv,null);
655
- @ var lineColor = canvasStyle.getPropertyValue('color') || 'black';
656
- @ var bgColor = canvasStyle.getPropertyValue('background-color') || 'white';
654
+ @ var canvasStyle = window.getComputedStyle && window.getComputedStyle(canvasDiv,null);
655
+ @ var lineColor = (canvasStyle && canvasStyle.getPropertyValue('color')) || 'black';
656
+ @ var bgColor = (canvasStyle && canvasStyle.getPropertyValue('background-color')) || 'white';
657657
@ if( bgColor=='transparent' ) bgColor = 'white';
658658
@ var boxColor = lineColor;
659659
@ function drawBox(color,x0,y0,x1,y1){
660660
@ var n = document.createElement("div");
661661
@ if( x0>x1 ){ var t=x0; x0=x1; x1=t; }
662662
--- src/timeline.c
+++ src/timeline.c
@@ -649,13 +649,13 @@
649 cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n");
650 }
651 cgi_printf("var nrail = %d\n", pGraph->mxRail+1);
652 graph_free(pGraph);
653 @ var canvasDiv = gebi("canvas");
654 @ var canvasStyle = window.getComputedStyle(canvasDiv,null);
655 @ var lineColor = canvasStyle.getPropertyValue('color') || 'black';
656 @ var bgColor = canvasStyle.getPropertyValue('background-color') || 'white';
657 @ if( bgColor=='transparent' ) bgColor = 'white';
658 @ var boxColor = lineColor;
659 @ function drawBox(color,x0,y0,x1,y1){
660 @ var n = document.createElement("div");
661 @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; }
662
--- src/timeline.c
+++ src/timeline.c
@@ -649,13 +649,13 @@
649 cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n");
650 }
651 cgi_printf("var nrail = %d\n", pGraph->mxRail+1);
652 graph_free(pGraph);
653 @ var canvasDiv = gebi("canvas");
654 @ var canvasStyle = window.getComputedStyle && window.getComputedStyle(canvasDiv,null);
655 @ var lineColor = (canvasStyle && canvasStyle.getPropertyValue('color')) || 'black';
656 @ var bgColor = (canvasStyle && canvasStyle.getPropertyValue('background-color')) || 'white';
657 @ if( bgColor=='transparent' ) bgColor = 'white';
658 @ var boxColor = lineColor;
659 @ function drawBox(color,x0,y0,x1,y1){
660 @ var n = document.createElement("div");
661 @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; }
662
+3 -3
--- src/timeline.c
+++ src/timeline.c
@@ -649,13 +649,13 @@
649649
cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n");
650650
}
651651
cgi_printf("var nrail = %d\n", pGraph->mxRail+1);
652652
graph_free(pGraph);
653653
@ var canvasDiv = gebi("canvas");
654
- @ var canvasStyle = window.getComputedStyle(canvasDiv,null);
655
- @ var lineColor = canvasStyle.getPropertyValue('color') || 'black';
656
- @ var bgColor = canvasStyle.getPropertyValue('background-color') || 'white';
654
+ @ var canvasStyle = window.getComputedStyle && window.getComputedStyle(canvasDiv,null);
655
+ @ var lineColor = (canvasStyle && canvasStyle.getPropertyValue('color')) || 'black';
656
+ @ var bgColor = (canvasStyle && canvasStyle.getPropertyValue('background-color')) || 'white';
657657
@ if( bgColor=='transparent' ) bgColor = 'white';
658658
@ var boxColor = lineColor;
659659
@ function drawBox(color,x0,y0,x1,y1){
660660
@ var n = document.createElement("div");
661661
@ if( x0>x1 ){ var t=x0; x0=x1; x1=t; }
662662
--- src/timeline.c
+++ src/timeline.c
@@ -649,13 +649,13 @@
649 cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n");
650 }
651 cgi_printf("var nrail = %d\n", pGraph->mxRail+1);
652 graph_free(pGraph);
653 @ var canvasDiv = gebi("canvas");
654 @ var canvasStyle = window.getComputedStyle(canvasDiv,null);
655 @ var lineColor = canvasStyle.getPropertyValue('color') || 'black';
656 @ var bgColor = canvasStyle.getPropertyValue('background-color') || 'white';
657 @ if( bgColor=='transparent' ) bgColor = 'white';
658 @ var boxColor = lineColor;
659 @ function drawBox(color,x0,y0,x1,y1){
660 @ var n = document.createElement("div");
661 @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; }
662
--- src/timeline.c
+++ src/timeline.c
@@ -649,13 +649,13 @@
649 cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n");
650 }
651 cgi_printf("var nrail = %d\n", pGraph->mxRail+1);
652 graph_free(pGraph);
653 @ var canvasDiv = gebi("canvas");
654 @ var canvasStyle = window.getComputedStyle && window.getComputedStyle(canvasDiv,null);
655 @ var lineColor = (canvasStyle && canvasStyle.getPropertyValue('color')) || 'black';
656 @ var bgColor = (canvasStyle && canvasStyle.getPropertyValue('background-color')) || 'white';
657 @ if( bgColor=='transparent' ) bgColor = 'white';
658 @ var boxColor = lineColor;
659 @ function drawBox(color,x0,y0,x1,y1){
660 @ var n = document.createElement("div");
661 @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; }
662

Keyboard Shortcuts

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