[Pkg-javascript-commits] [d3-tip.js] 128/277: implement nw 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 f4e97bd9f4cd8933247eaa9f0c3647f559d79af3
Author: Justin Palmer <justin at github.com>
Date: Sun Apr 21 18:36:29 2013 -0700
implement nw direction support
---
src/d3.tip.js | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/d3.tip.js b/src/d3.tip.js
index 7a2dbcb..fb5e0da 100644
--- a/src/d3.tip.js
+++ b/src/d3.tip.js
@@ -123,10 +123,11 @@ d3.tip = function() {
function d3_tip_html() { return ' ' }
var direction_callbacks = d3.map({
- n: direction_n,
- s: direction_s,
- e: direction_e,
- w: direction_w
+ n: direction_n,
+ s: direction_s,
+ e: direction_e,
+ w: direction_w,
+ nw: direction_nw
})
function direction_n() {
@@ -161,6 +162,14 @@ d3.tip = function() {
}
}
+ function direction_nw() {
+ var bbox = get_screen_bbox()
+ return {
+ top: bbox.nw.y - node.offsetHeight,
+ left: bbox.nw.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