Cc.SpriteCanvas image loaded after the code

Hello,

I’d like to report a bug - in cc.SpriteCanvas, method draw, there are cases when the image is loaded partially or not at all. So there shall be try-catch block around the function. Like this:

@
draw: function(a) {
try {
a = a || cc.renderContext;
this.*isLighterMode && ;
a.globalAlpha = this.*opacity / 255;
var b = 0, c = 0;
this.*flipX && );
this.*flipY && (c = this.*rect.size.height, a.scale);
var d = 0 | this.*offsetPosition.x, e = 0 | this.*offsetPosition.y;
this.*texture ? this.*colorized ? a.drawImage : a.drawImage : 0 ! this._contentSize.width && (a.fillStyle = “rgba(” + this._color.r + “,” + this._color.g + “,” + this._color.b + “,1)”,
a.fillRect(d, e, this._contentSize.width, -this._contentSize.height));
1 = cc.SPRITE_DEBUG_DRAW ? ", a = , cc.drawingUtil.drawPoly) : 2 === cc.SPRITE_DEBUG_DRAW && ", a = this.*rect.size, b = this.getOffsetPosition(), a = [cc.p(b.x, b.y), cc.p(b.x + a.width, b.y), cc.p(b.x + a.width, b.y + a.height), cc.p(b.x, b.y + a.height)], cc.drawingUtil.drawPoly(a,
4, !0));
cc.g_NumberOfDraws++
} catch (e) {
}
}
@

I have experienced problems with that on IE. Other browsers seem not to produce this error.

Hi,Miroslav Kuťák.
This bug had be fixed in v2.1.6: