Fixed JS issue with diff image loading
This commit is contained in:
parent
090f2344ec
commit
1989b66734
1 changed files with 5 additions and 4 deletions
|
@ -119,8 +119,9 @@ class @ImageFile
|
|||
|
||||
requestImageInfo: (img, callback) ->
|
||||
domImg = img.get(0)
|
||||
if domImg.complete
|
||||
callback.call(this, domImg.naturalWidth, domImg.naturalHeight)
|
||||
else
|
||||
img.on 'load', =>
|
||||
if domImg
|
||||
if domImg.complete
|
||||
callback.call(this, domImg.naturalWidth, domImg.naturalHeight)
|
||||
else
|
||||
img.on 'load', =>
|
||||
callback.call(this, domImg.naturalWidth, domImg.naturalHeight)
|
||||
|
|
Loading…
Reference in a new issue