[Pkg-javascript-commits] [d3-tip.js] 29/277: all the tomdoc

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 8ee11f4ce43e4b62d962c225cd80d32966084a90
Author: Justin Palmer <justin at labratrevenge.com>
Date:   Mon Jan 9 11:14:00 2012 -0800

    all the tomdoc
---
 src/d3.tip.js | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/src/d3.tip.js b/src/d3.tip.js
index 15cda24..d8ae81e 100644
--- a/src/d3.tip.js
+++ b/src/d3.tip.js
@@ -1,3 +1,6 @@
+// Public - contructs a new tooltip
+//
+// Returns a tip
 d3.svg.tip = function() {
   var orient = 'top',
       padding = 5,
@@ -60,6 +63,8 @@ d3.svg.tip = function() {
         return {x: x, y: y}   
       },
 
+      // Bottom is the only tooltip that uses a stem with triangle-up, so we need to do 
+      // a little more work here.
       bottom: function() {
         stem.remove()
         stem_gen = d3.svg.symbol().type('triangle-up').size(stemSize)
@@ -165,36 +170,66 @@ d3.svg.tip = function() {
     return tip;
   }
 
+  // Public: Set or get the orientation of the tooltip
+  //
+  // v - One of top, bottom, left, or right
+  //
+  // Returns tip or oreint
   tip.orient = function(v) {
     if (!arguments.length) return orient;
     orient = v;
     return tip;
   };
 
+  // Public: Sets or gets the padding on all sides for the tooltip
+  //
+  // v - Padding value as a number
+  //
+  // Returns padding or tip
   tip.padding = function(v) {
     if (!arguments.length) return padding;
     padding = v;
     return tip;
   };
 
+  // Public: Sets or gets the corner radius of the tooltip on all sides
+  //
+  // v - Radius as a Number
+  //
+  // Returns cornerRadius or tip
   tip.cornerRadius = function(v) {
     if (!arguments.length) return cornerRadius;
     cornerRadius = v;
     return tip;
   };
 
+  // Public: Sets or gets the size of the stem
+  //
+  // v - size of the stem
+  // 
+  // Returns stemSize or tip
   tip.stemSize = function(v) {
     if (!arguments.length) return stemSize;
     stemSize = v;
     return tip;
   };
 
+  // Public: Sets or gets the offset of the tip
+  //
+  // v - Array of [x, y] offset
+  //
+  // Returns offset or 
   tip.offset = function(v) {
     if (!arguments.length) return offset;
     offset = v == null ? v: d3.functor(v);
     return tip;
   };  
 
+  // Public: sets or gets the text value of the tooltip
+  //
+  // v - String value of the tip
+  //
+  // Returns text value or tip
   tip.text = function(v) {
     if (!arguments.length) return text;
     text = v == null ? v: d3.functor(v);

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