[Pkg-javascript-commits] [d3-tip.js] 23/277: right orient for rects

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:13 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 424c33df2215b612247e6f9adbab492c0f9463d9
Author: Justin Palmer <justin at labratrevenge.com>
Date:   Mon Jan 9 08:52:01 2012 -0800

    right orient for rects
---
 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 a17cd1c..e4f3cc1 100644
--- a/src/d3.tip.js
+++ b/src/d3.tip.js
@@ -84,14 +84,14 @@ d3.svg.tip = function() {
         stem.attr('transform', 'translate(' + -(stemRect.height / 2) + ',' + (backingRect.height / 2) + ') rotate(90)');
         
         containerRect = container.node().getBBox()
-        x = targetRect.x + (targetRect.width / 2) + stemRect.height + containerRect.width + tipOffset[0];
+        x = targetRect.x + stemRect.height + tipOffset[0];
         y = targetRect.y + tipOffset[1];
 
         if(tag == 'circle') {
-          x -= targetRect.width + (containerRect.width / 2);
+          x += targetRect.width
           y -= targetRect.height / 2
         } else if(tag == 'rect') {
-          x -= containerRect.width - (stemRect.height / 2)
+          x += targetRect.width
           y -= containerRect.height / 2
         }
       break;    

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