[Pkg-javascript-commits] [d3-tip.js] 28/277: fix for attr and tomdoc docs
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 29fdca1faf5a721fd15253467c128fc38e99f7ca
Author: Justin Palmer <justin at labratrevenge.com>
Date: Mon Jan 9 11:03:37 2012 -0800
fix for attr and tomdoc docs
---
src/d3.tip.js | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/d3.tip.js b/src/d3.tip.js
index 25f8d74..15cda24 100644
--- a/src/d3.tip.js
+++ b/src/d3.tip.js
@@ -149,8 +149,19 @@ d3.svg.tip = function() {
return ' ';
}
+ // Public: Proxy attr calls to the d3 tip container. Sets or gets attribute value.
+ //
+ // n - name of the attribute
+ // v - value of the attribute
+ //
+ // Returns tip or attribute value
tip.attr = function(n, v) {
- d3.select(node).attr(n, v)
+ if (arguments.length < 2) {
+ return d3.select(node).attr(n)
+ } else {
+ d3.select(node).attr(n, v)
+ }
+
return tip;
}
--
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