getComputedStyle -> window.getComputedStyle
authorDan Vanderkam <danvk@google.com>
Tue, 19 Feb 2013 20:55:35 +0000 (15:55 -0500)
committerDan Vanderkam <danvk@google.com>
Tue, 19 Feb 2013 20:55:35 +0000 (15:55 -0500)
dygraph-utils.js

index 67cf4f7..6aa7dfc 100644 (file)
@@ -301,7 +301,7 @@ Dygraph.findPosX = function(obj) {
   if(obj.offsetParent) {
     var copyObj = obj;
     while(1) {
-      var borderLeft = getComputedStyle(copyObj, null).borderLeft || "0";
+      var borderLeft = window.getComputedStyle(copyObj, null).borderLeft || "0";
       curleft += parseInt(borderLeft, 10) ;
       curleft += copyObj.offsetLeft;
       if(!copyObj.offsetParent) {
@@ -334,7 +334,7 @@ Dygraph.findPosY = function(obj) {
   if(obj.offsetParent) {
     var copyObj = obj;
     while(1) {
-      var borderTop = getComputedStyle(copyObj, null).borderTop || "0";
+      var borderTop = window.getComputedStyle(copyObj, null).borderTop || "0";
       curtop += parseInt(borderTop, 10) ;
       curtop += copyObj.offsetTop;
       if(!copyObj.offsetParent) {