cocos2d / cocos2d-html5

Cocos2d for Web Browsers. Built using JavaScript.
https://www.cocos.com
3.07k stars 902 forks source link

IE9(CCProgressTimer) - DOM Exception: INDEX_SIZE_ERR #659

Closed zabumba69 closed 11 years ago

zabumba69 commented 11 years ago

Hi, I ported my game to cocos2d-html5 and the game work fine in Chrome and Firefox, but on IE this is not working.

Follow the error:

DOM Exception: INDEX_SIZE_ERR (1) CCProgressTimer.js, line 300 character 21

I'm using Cocos2d-html5-v2.0.0

Thanks all!

zabumba69 commented 11 years ago

I fix it add: if ((this._originSize.width != 0) && (this._originSize.height != 0)) {

Example: if ((this._originSize.width != 0) && (this._originSize.height != 0)) { context.drawImage(this._sprite._texture, this._sprite._rect.origin.x + this._origin.x, this._sprite._rect.origin.y + this._origin.y, this._originSize.width, this._originSize.height, pos.x, -(pos.y + this._drawSize.height), this._originSize.width, this._originSize.height); }

dingpinglv commented 11 years ago

Thank you! I will fix it soon.

linshun commented 11 years ago

It had been fixed, please check it and close this issue.