diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-02-23 11:47:09 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-02-23 11:47:09 +0100 |
commit | a4ad42e9fb0a9fd63a6e609083729f3060634462 (patch) | |
tree | 80bd4eaa4e48004e0bdddad08f231bc60b4e3ee2 /src/doc.js | |
parent | 2ecbacb41660ab7971a444370f3b07464cd1c6e1 (diff) | |
download | svg.js-a4ad42e9fb0a9fd63a6e609083729f3060634462.tar.gz svg.js-a4ad42e9fb0a9fd63a6e609083729f3060634462.zip |
Rework of `drawing.remove()`
Diffstat (limited to 'src/doc.js')
-rwxr-xr-x | src/doc.js | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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; } |