projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
88a17b3
)
Fix for IE8
ie8-fix
author
Dan Vanderkam
<danvdk@gmail.com>
Sun, 23 Nov 2014 07:03:19 +0000
(
02:03
-0500)
committer
Dan Vanderkam
<danvdk@gmail.com>
Sun, 23 Nov 2014 07:03:19 +0000
(
02:03
-0500)
dygraph-utils.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph-utils.js
b/dygraph-utils.js
index
4f90c65
..
bf93665
100644
(file)
--- a/
dygraph-utils.js
+++ b/
dygraph-utils.js
@@
-1148,7
+1148,13
@@
Dygraph.toRGB_ = function(colorStr) {
div.style.backgroundColor = colorStr;
div.style.visibility = 'hidden';
document.body.appendChild(div);
div.style.backgroundColor = colorStr;
div.style.visibility = 'hidden';
document.body.appendChild(div);
- var rgbStr = window.getComputedStyle(div, null).backgroundColor;
+ var rgbStr;
+ if (window.getComputedStyle) {
+ rgbStr = window.getComputedStyle(div, null).backgroundColor;
+ } else {
+ // IE8
+ rgbStr = div.currentStyle.backgroundColor;
+ }
document.body.removeChild(div);
var bits = /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(rgbStr);
return {
document.body.removeChild(div);
var bits = /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(rgbStr);
return {