[Pkg-javascript-commits] [d3-tip.js] 47/277: Adjust placement when target object is a rectangle
    bhuvan krishna 
    bhuvan-guest at moszumanska.debian.org
       
    Thu Dec  8 06:57:15 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 02363bb8034a21068d282a691eae3437a7ca8bcf
Author: Karl Broman <kbroman at gmail.com>
Date:   Sat Feb 16 07:03:01 2013 -0600
    Adjust placement when target object is a rectangle
---
 src/d3.tip.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/d3.tip.js b/src/d3.tip.js
index e810ee5..e0a5ad6 100644
--- a/src/d3.tip.js
+++ b/src/d3.tip.js
@@ -108,7 +108,7 @@ d3.svg.tip = function() {
           y -= targetRect.height / 2
         } else if(tag == 'rect') {
           x -= containerRect.width - (stemRect.height / 2)
-          y -= targetRect.height / 2
+          y += targetRect.height / 2
         }
 
         return {x: x, y: y}
@@ -126,7 +126,7 @@ d3.svg.tip = function() {
           y -= targetRect.height / 2
         } else if(tag == 'rect') {
           x += targetRect.width
-          y -= targetRect.height / 2
+          y += targetRect.height / 2
         }
 
         return {x: x, y: y}
@@ -258,4 +258,4 @@ d3.svg.tip = function() {
   }
 
   return tip;
-}
\ No newline at end of file
+}
-- 
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