new commit: fix labelsDivStyles IE8
authorJosep Llodrà <jlg.hrtc@gmail.com>
Fri, 24 Feb 2012 12:09:00 +0000 (13:09 +0100)
committerJosep Llodrà <jlg.hrtc@gmail.com>
Fri, 24 Feb 2012 12:09:00 +0000 (13:09 +0100)
dygraph.js

index fed1cf4..2bc3f7a 100644 (file)
@@ -1002,10 +1002,12 @@ Dygraph.prototype.createStatusMessage_ = function() {
     var div = document.createElement("div");
     div.className = "dygraph-legend";
     for (var name in messagestyle) {
-               try {
-                       div.style[name] = messagestyle[name];
-               } catch (e) {
-                       console.warn("You are using unsupported css properties for your browser in labelsDivStyles");
+               if (messagestyle.hasOwnProperty(name)) {
+                       try {
+                               div.style[name] = messagestyle[name];
+                       } catch (e) {
+                               console.warn("You are using unsupported css properties for your browser in labelsDivStyles");
+                       }
                }
     }
     this.graphDiv.appendChild(div);