[Pkg-javascript-commits] [d3-tip.js] 130/277: implement sw 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 57d4271468055ecdb52983c40c949d5d75f44288
Author: Justin Palmer <justin at github.com>
Date:   Sun Apr 21 18:42:33 2013 -0700

    implement sw 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 9b70d41..d3d20a1 100644
--- a/src/d3.tip.js
+++ b/src/d3.tip.js
@@ -128,7 +128,8 @@ d3.tip = function() {
     e:  direction_e,
     w:  direction_w,
     nw: direction_nw,
-    ne: direction_ne
+    ne: direction_ne,
+    sw: direction_sw
   })
 
   function direction_n() {
@@ -179,6 +180,14 @@ d3.tip = function() {
     }
   }
 
+  function direction_sw() {
+    var bbox = get_screen_bbox()
+    return {
+      top:  bbox.sw.y,
+      left: bbox.sw.x - node.offsetWidth
+    }
+  }
+
   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