diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/element.js | 4 | ||||
-rw-r--r-- | src/fx.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/element.js b/src/element.js index ac06109..cced952 100644 --- a/src/element.js +++ b/src/element.js @@ -205,7 +205,7 @@ SVG.extend(SVG.Element, { return this.attr('transform', transform.join(' ')); }, // Store data values on svg nodes - data: function(a, v) { + data: function(a, v, r) { if (arguments.length < 2) { try { return JSON.parse(this.attr('data-' + a)); @@ -216,7 +216,7 @@ SVG.extend(SVG.Element, { } else { v === null ? this.node.removeAttribute('data-' + a) : - this.attr('data-' + a, JSON.stringify(v)); + this.attr('data-' + a, r === true ? v : JSON.stringify(v)); } return this; @@ -222,11 +222,11 @@ SVG.extend(SVG.FX, { SVG.extend(SVG.Element, { // Get fx module or create a new one, then animate with given duration and ease animate: function(duration, ease) { - return (this._fx || (this._fx = new SVG.FX(this))).stop().animate(duration, ease); + return (this.fx || (this.fx = new SVG.FX(this))).stop().animate(duration, ease); }, // Stop current animation; this is an alias to the fx instance stop: function() { - this._fx.stop(); + this.fx.stop(); return this; } |