summaryrefslogtreecommitdiffstats
path: root/src/image.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.js')
-rwxr-xr-x[-rw-r--r--]src/image.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/image.js b/src/image.js
index feb369e..02bfb11 100644..100755
--- a/src/image.js
+++ b/src/image.js
@@ -16,6 +16,8 @@ SVG.Image = SVG.invent({
// preload image
SVG.on(img, 'load', function() {
+ SVG.off(img)
+
var p = self.parent(SVG.Pattern)
if(p === null) return
@@ -39,6 +41,8 @@ SVG.Image = SVG.invent({
})
SVG.on(img, 'error', function(e){
+ SVG.off(img)
+
if (typeof self._error === 'function'){
self._error.call(self, e)
}