diff options
author | wout <wout@impinc.co.uk> | 2013-04-12 13:16:21 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-04-12 13:16:21 +0100 |
commit | 9aa9472043fa53ce11f716537a4e1eded464cc97 (patch) | |
tree | 388f36a1220ecb655bf7447253ee1b46dea77c46 /dist/svg.js | |
parent | ec833bcefe20bd51d128cd0978128a9c9a63a043 (diff) | |
download | svg.js-9aa9472043fa53ce11f716537a4e1eded464cc97.tar.gz svg.js-9aa9472043fa53ce11f716537a4e1eded464cc97.zip |
Bumped to v0.13
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 } |