[Pkg-javascript-commits] [d3-tip.js] 129/277: implement ne direction support

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:23 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 82e63ad1ce8a7ce2c6e767a2881e81bf5325964d
Author: Justin Palmer <justin at github.com>
Date:   Sun Apr 21 18:40:17 2013 -0700

    implement ne direction support
---
 src/d3.tip.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/d3.tip.js b/src/d3.tip.js
index fb5e0da..9b70d41 100644
--- a/src/d3.tip.js
+++ b/src/d3.tip.js
@@ -127,7 +127,8 @@ d3.tip = function() {
     s:  direction_s,
     e:  direction_e,
     w:  direction_w,
-    nw: direction_nw
+    nw: direction_nw,
+    ne: direction_ne
   })
 
   function direction_n() {
@@ -170,6 +171,14 @@ d3.tip = function() {
     }
   }
 
+  function direction_ne() {
+    var bbox = get_screen_bbox()
+    return {
+      top:  bbox.ne.y - node.offsetHeight,
+      left: bbox.ne.x
+    }
+  }
+
   function init_node() {
     var node = document.createElement('div')
     node.style.position = 'absolute'

-- 
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