summaryrefslogtreecommitdiffstats
path: root/dist/svg.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-04-15 12:04:41 +0100
committerwout <wout@impinc.co.uk>2013-04-15 12:04:41 +0100
commitd0c34f778e854bd5f3e1c15d853bd126aad2d85d (patch)
tree409f40cf2fe69aef513676e59a2d88d8f069d25b /dist/svg.js
parent801a9e1bfb6ff2fb31d00f9bc71b9af1175395bb (diff)
downloadsvg.js-d0c34f778e854bd5f3e1c15d853bd126aad2d85d.tar.gz
svg.js-d0c34f778e854bd5f3e1c15d853bd126aad2d85d.zip
Removing style attributes when empty
Diffstat (limited to 'dist/svg.js')
-rw-r--r--dist/svg.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/dist/svg.js b/dist/svg.js
index e3dd338..e904375 100644
--- a/dist/svg.js
+++ b/dist/svg.js
@@ -1,4 +1,4 @@
-/* svg.js v0.13-4-g874a935 - svg regex default color viewbox bbox element container fx event group arrange defs mask clip pattern gradient doc shape rect ellipse line poly path plotable image text nested sugar - svgjs.com/license */
+/* svg.js v0.13-5-g801a9e1 - svg regex default color viewbox bbox element container fx event group arrange defs mask clip pattern gradient doc shape rect ellipse line poly path plotable image text nested sugar - svgjs.com/license */
;(function() {
this.SVG = function(element) {
@@ -699,7 +699,10 @@
s += v + ':' + this.styles[v] + ';'
/* apply style */
- this.node.setAttribute('style', s)
+ if (s == '')
+ this.node.removeAttribute('style')
+ else
+ this.node.setAttribute('style', s)
return this
}