diff options
Diffstat (limited to 'src/image.js')
-rw-r--r-- | src/image.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/image.js b/src/image.js index bc60c0e..7546936 100644 --- a/src/image.js +++ b/src/image.js @@ -3,14 +3,13 @@ SVG.Image = function() { } // Inherit from SVG.Element -SVG.Image.prototype = new SVG.Shape() +SVG.Image.prototype = new SVG.Shape SVG.extend(SVG.Image, { - /* (re)load image */ + // (re)load image load: function(url) { - this.src = url - return (url ? this.attr('xlink:href', url, SVG.xlink) : this) + return (url ? this.attr('xlink:href', (this.src = url), SVG.xlink) : this) } })
\ No newline at end of file |