Permalink
Browse files

adjustments for priimage

  • Loading branch information...
felipevex committed Jul 10, 2018
1 parent d768ea3 commit 7f4dbf26ed1b1d4e61dcd35079ef67ac39d5cf37
Showing with 3 additions and 2 deletions.
  1. +3 −2 priori/view/PriImage.hx
View
@@ -1,5 +1,7 @@
package priori.view;
import haxe.io.BytesData;
import haxe.io.Bytes;
import js.html.Image;
import priori.app.PriApp;
import priori.event.PriEvent;
@@ -79,15 +81,14 @@ class PriImage extends PriDisplay {
this._originalImageWidth = this._imageObject.naturalWidth;
this._originalImageHeight = this._imageObject.naturalHeight;
this._imageElement = new JQuery(this._imageObject);
this._imageObject = null;
this.startImageElement();
this.dispatchEvent(new PriEvent(PriEvent.COMPLETE));
}
this._imageObject.onerror = function():Void {
this._imageObject.onload = null;
this._imageObject.onerror = null;
this._imageObject = null;
this.dispatchEvent(new PriEvent(PriEvent.ERROR));
}

0 comments on commit 7f4dbf2

Please sign in to comment.