diff options
author | wout <wout@impinc.co.uk> | 2012-12-17 19:39:52 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2012-12-17 19:39:52 +0100 |
commit | 8dfec33b4fa79b89d89a07e3ae92c5d5c5f8ce73 (patch) | |
tree | 7caa493057b543ac40008770fdb4df566995c4e7 /src/element.js | |
parent | 6a013f19d6fa84e538d31bca5f1466c5f3479630 (diff) | |
download | svg.js-8dfec33b4fa79b89d89a07e3ae92c5d5c5f8ce73.tar.gz svg.js-8dfec33b4fa79b89d89a07e3ae92c5d5c5f8ce73.zip |
Code slimming
Diffstat (limited to 'src/element.js')
-rw-r--r-- | src/element.js | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/element.js b/src/element.js index 7926e1f..9536a79 100644 --- a/src/element.js +++ b/src/element.js @@ -42,32 +42,20 @@ SVG.Utils.merge(SVG.Element, { }, // remove element - destroy: function() { + remove: function() { return this.parent != null ? this.parent.remove(this) : void 0; }, // get parent document parentDoc: function() { - return this._parent(SVG.Document); + return this._parent(SVG.Doc); }, // get parent svg wrapper parentSVG: function() { return this.parentDoc(); }, - - //_D // set svg element attribute - //_D setAttribute: function(a, v, ns) { - //_D this.attrs[a] = v; - //_D - //_D if (ns != null) - //_D this.node.setAttributeNS(ns, a, v); - //_D else - //_D this.node.setAttribute(a, v); - //_D - //_D return this; - //_D }, - + // set svg element attribute attr: function(v) { var a = arguments; |