aboutsummaryrefslogtreecommitdiffstats
path: root/src/doc.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-02-23 11:47:09 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-02-23 11:47:09 +0100
commita4ad42e9fb0a9fd63a6e609083729f3060634462 (patch)
tree80bd4eaa4e48004e0bdddad08f231bc60b4e3ee2 /src/doc.js
parent2ecbacb41660ab7971a444370f3b07464cd1c6e1 (diff)
downloadsvg.js-a4ad42e9fb0a9fd63a6e609083729f3060634462.tar.gz
svg.js-a4ad42e9fb0a9fd63a6e609083729f3060634462.zip
Rework of `drawing.remove()`
Diffstat (limited to 'src/doc.js')
-rwxr-xr-xsrc/doc.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/doc.js b/src/doc.js
index a2c756b..820a8cd 100755
--- a/src/doc.js
+++ b/src/doc.js
@@ -80,9 +80,11 @@ SVG.Doc = SVG.invent({
}
// Removes the doc from the DOM
- , destroy: function() {
- this.parent.removeChild(this.node);
- this.parent = null;
+ , remove: function() {
+ if(this.parent) {
+ this.parent.removeChild(this.node);
+ this.parent = null;
+ }
return this;
}