diff options
Diffstat (limited to 'dist/svg.js')
-rw-r--r-- | dist/svg.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/dist/svg.js b/dist/svg.js index 3b2f6e9..27f009c 100644 --- a/dist/svg.js +++ b/dist/svg.js @@ -1,4 +1,4 @@ -/* svg.js v0.12-20-g0ec7b9b - 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 - 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) { @@ -574,7 +574,11 @@ } // Manage transformations , transform: function(o, v) { - if (typeof o === 'string') { + if (arguments.length == 0) { + /* act as a getter if no argument is given */ + return this.trans + + } else if (typeof o === 'string') { /* act as a getter if only one string argument is given */ if (arguments.length < 2) return this.trans[o] @@ -641,9 +645,8 @@ if (this._offset) transform.push('translate(' + (-this._offset.x) + ',' + (-this._offset.y) + ')') - /* add only te required transformations */ - if (transform.length > 0) - this.node.setAttribute('transform', transform.join(' ')) + /* update transformations, even if there are none */ + this.node.setAttribute('transform', transform.join(' ')) return this } |