summaryrefslogtreecommitdiffstats
path: root/src/image.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.js')
-rw-r--r--src/image.js17
1 files changed, 17 insertions, 0 deletions
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