[Pkg-javascript-commits] [d3-tip.js] 95/277: add proxy method for setting style values

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:20 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 a0e2eda84c117be8ec9432e3074867e5f07e64bd
Author: Justin Palmer <justin at github.com>
Date:   Sun Apr 21 12:42:29 2013 -0700

    add proxy method for setting style values
---
 src/d3.tip.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/d3.tip.js b/src/d3.tip.js
index 2f3498a..4524e5c 100644
--- a/src/d3.tip.js
+++ b/src/d3.tip.js
@@ -63,6 +63,22 @@ d3.tip = function() {
     return tip;
   }
 
+  // Public: Proxy style calls to the d3 tip container.  Sets or gets a style value.
+  //
+  // n - name of the property
+  // v - value of the property
+  //
+  // Returns tip or style property value
+  tip.style = function(n, v) {
+    if (arguments.length < 2) {
+      return d3.select(node).style(n)
+    } else {
+      d3.select(node).style(n, v)
+    }
+
+    return tip;
+  }
+
   // Public: Set or get the direction of the tooltip
   //
   // v - One of n(orth), s(outh), e(ast), or w(est)

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