summaryrefslogtreecommitdiffstats
path: root/src/image.js
blob: bc1dc60303c735dc5c3087914f4e2c59a23ad3b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
SVG.Image = function Image() {
  this.constructor.call(this, SVG.create('image'));
};

// inherit from SVG.Element
SVG.Image.prototype = new SVG.Element();

// include the container object
SVG.Utils.merge(SVG.Image, SVG.Container);

// Add image-specific functions
SVG.Utils.merge(SVG.Image, {
  
  // (re)load image
  load: function(u) {
    this.attr('href', u, SVG.xlink);
    return this;
  }
  
});