diff options
author | wout <wout@impinc.co.uk> | 2013-04-15 12:04:41 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-04-15 12:04:41 +0100 |
commit | d0c34f778e854bd5f3e1c15d853bd126aad2d85d (patch) | |
tree | 409f40cf2fe69aef513676e59a2d88d8f069d25b /dist/svg.js | |
parent | 801a9e1bfb6ff2fb31d00f9bc71b9af1175395bb (diff) | |
download | svg.js-d0c34f778e854bd5f3e1c15d853bd126aad2d85d.tar.gz svg.js-d0c34f778e854bd5f3e1c15d853bd126aad2d85d.zip |
Removing style attributes when empty
Diffstat (limited to 'dist/svg.js')
-rw-r--r-- | dist/svg.js | 7 |
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 } |