[Pkg-javascript-commits] [d3-tip.js] 74/277: api docs

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:18 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 1e69b8f0532ade4a3823178401234c3167b6676f
Author: Justin Palmer <justin at github.com>
Date:   Sun Apr 7 15:25:00 2013 -0700

    api docs
---
 src/d3.tip.js | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/d3.tip.js b/src/d3.tip.js
index 8d0679f..e9db88c 100644
--- a/src/d3.tip.js
+++ b/src/d3.tip.js
@@ -17,6 +17,9 @@ d3.svg.tip = function() {
     document.body.appendChild(node)
   }
 
+  // Public - show the tooltip on the screen
+  //
+  // Returns a tip
   tip.show = function(v) {
     var content = text.apply(this, arguments),
       dir = direction.apply(this, arguments),
@@ -32,6 +35,9 @@ d3.svg.tip = function() {
     return tip
   }
 
+  // Public - hide the tooltip
+  //
+  // Returns a tip
   tip.hide = function(v) {
     node.style.display = 'none'
     node.innerText = ''
@@ -155,6 +161,19 @@ d3.svg.tip = function() {
     return null
   }
 
+  // Private - gets the screen coordinates of a shape
+  //
+  // Given a shape on the screen, will return an SVGPoint for the directions
+  // n(orth), s(outh), e(ast), w(est), ne(northeast), se(southeast), nw(northwest),
+  // sw(southwest).
+  //
+  //    +-+-+
+  //    |   |
+  //    +   +
+  //    |   |
+  //    +-+-+
+  //
+  // Returns an Object {n, s, e, w, nw, sw, ne, se}
   function get_screen_bbox() {
     var target = d3.event.target,
         bbox   = {},

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