[Pkg-javascript-commits] [d3-tip.js] 195/277: body.scroll* is deprecated. Use documentElement instead. Fixes #26

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

bhuvan-guest pushed a commit to branch master
in repository d3-tip.js.

commit df99e42bd8e6a0547d34d2d0bf9501c69fe8e6fb
Author: Justin Palmer <justin at github.com>
Date:   Mon Oct 28 15:53:58 2013 -0700

    body.scroll* is deprecated.  Use documentElement instead.  Fixes #26
---
 index.js | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/index.js b/index.js
index e84ca7f..4608bee 100644
--- a/index.js
+++ b/index.js
@@ -246,13 +246,8 @@ d3.tip = function() {
         height     = tbbox.height,
         x          = tbbox.x,
         y          = tbbox.y,
-        scrollTop  = document.body.scrollTop,
-        scrollLeft = document.body.scrollLeft
-
-    if(document.documentElement && document.documentElement.scrollTop) {
-      scrollTop  = document.documentElement.scrollTop
-      scrollLeft = document.documentElement.scrollLeft
-    }
+        scrollTop  = document.documentElement.scrollTop,
+        scrollLeft = document.documentElement.scrollLeft
 
     point.x = x + scrollLeft
     point.y = y + scrollTop

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/d3-tip.js.git



More information about the Pkg-javascript-commits mailing list