Permalink
Browse files

fixed #1463 add setResourcePath function to CC.BuilderReader and comp…

…atible with IE9 for CC.ProgressTimer
  • Loading branch information...
1 parent ea044c1 commit 63fd40d6db86d4bfae13de1b762c981590db24ab @dingpinglv dingpinglv committed Nov 29, 2012
Showing with 87 additions and 76 deletions.
  1. +7 −5 cocos2d/misc_nodes/CCProgressTimer.js
  2. +80 −71 extensions/CCBReader/CCBReader.js
@@ -297,11 +297,13 @@ cc.ProgressTimer = cc.Node.extend(/** @lends cc.ProgressTimer# */{
( -this._sprite._anchorPointInPoints.y + this._sprite._offsetPosition.y + this._drawPosition.y));
if (this._sprite._texture instanceof HTMLImageElement) {
- 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);
+ 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);
+ }
} else if (this._sprite._texture instanceof HTMLCanvasElement) {
if ((this._originSize.width != 0) && (this._originSize.height != 0)) {
context.drawImage(this._sprite._texture,
Oops, something went wrong.

0 comments on commit 63fd40d

Please sign in to comment.