From c6ac1246c271c66733366086f467e381c3fd65a8 Mon Sep 17 00:00:00 2001 From: wout Date: Sun, 16 Dec 2012 16:15:47 +0100 Subject: Implemented core library --- src/image.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/image.js') diff --git a/src/image.js b/src/image.js index e69de29..ff70aee 100644 --- a/src/image.js +++ b/src/image.js @@ -0,0 +1,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); \ No newline at end of file -- cgit v1.2.3