[Pkg-javascript-commits] [d3-tip.js] 137/277: use ownerSVGElement instead of reverse lookup
bhuvan krishna
bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:24 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 a5b1216f972db126da97144da651625f9027992c
Author: Justin Palmer <justin at github.com>
Date: Wed Apr 24 09:36:31 2013 -0700
use ownerSVGElement instead of reverse lookup
---
src/d3.tip.js | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/d3.tip.js b/src/d3.tip.js
index 3d2e041..6807e4a 100644
--- a/src/d3.tip.js
+++ b/src/d3.tip.js
@@ -207,17 +207,10 @@ d3.tip = function() {
function get_svg_node(el) {
el = el.node()
- if(el.tagName.toLowerCase() == 'svg') {
+ if(el.tagName.toLowerCase() == 'svg')
return el
- } else {
- while(el.parentNode) {
- el = el.parentNode
- if(el.tagName.toLowerCase() == 'svg')
- return el
- }
- }
- return null
+ return el.ownerSVGElement
}
// Private - gets the screen coordinates of a shape
--
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