aboutsummaryrefslogtreecommitdiffstats
path: root/src/element.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-01-25 14:34:03 +0100
committerwout <wout@impinc.co.uk>2014-01-25 14:34:03 +0100
commitb48f03348ba04fb875c193f7e630fb35601bd9fe (patch)
tree573a2a9ff6f3b839c151d89f86a095bb3c98a87a /src/element.js
parent70879728a81c7bcee9f509a96b23443d35c912aa (diff)
downloadsvg.js-b48f03348ba04fb875c193f7e630fb35601bd9fe.tar.gz
svg.js-b48f03348ba04fb875c193f7e630fb35601bd9fe.zip
Added addTo() and putIn() methods, added more detailed documentation
Diffstat (limited to 'src/element.js')
-rwxr-xr-xsrc/element.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/element.js b/src/element.js
index dafb9b9..ad0fc4a 100755
--- a/src/element.js
+++ b/src/element.js
@@ -114,6 +114,14 @@ SVG.extend(SVG.Element, {
return element
}
+ // Add element to given container and return self
+, addTo: function(parent) {
+ return parent.put(this)
+ }
+ // Add element to given container and return container
+, putIn: function(parent) {
+ return parent.add(this)
+ }
// Get parent document
, doc: function(type) {
return this._parent(type || SVG.Doc)