summaryrefslogtreecommitdiffstats
path: root/src/container.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-05-08 11:10:20 +0100
committerwout <wout@impinc.co.uk>2013-05-08 11:10:20 +0100
commit9de0c38159d4ef6a187545a35bb887ffdb123dce (patch)
tree848b9f188c09901e0ebff844c4e97ce13d90036b /src/container.js
parent80f89b23313cbad8cf7dd2f25ebf760debde54e7 (diff)
downloadsvg.js-9de0c38159d4ef6a187545a35bb887ffdb123dce.tar.gz
svg.js-9de0c38159d4ef6a187545a35bb887ffdb123dce.zip
Removing defs and references on clear()
Diffstat (limited to 'src/container.js')
-rw-r--r--src/container.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/container.js b/src/container.js
index 5aac877..46ebdb1 100644
--- a/src/container.js
+++ b/src/container.js
@@ -156,10 +156,13 @@ SVG.extend(SVG.Container, {
/* remove children */
for (var i = this.children().length - 1; i >= 0; i--)
this.removeElement(this.children()[i])
-
- /* create new defs node */
- this.defs()
-
+
+ /* remove defs node */
+ if (this._defs) {
+ this._defs.remove()
+ delete this._defs
+ }
+
return this
}