aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.js
blob: ff70aeedd33d21210efe7b0e912b128b1c922f54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
SVG.Image = function Image() {
  this.drag = new SVG.Draggable(this);
  this.constructor.call(this, SVG.createElement('image'));
};

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

// (re)load image
SVG.Image.prototype.load = function(url) {
  this.setAttribute('href', url, SVG.xlink);
  return this;
};

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