Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
jareguo committed Oct 23, 2017
1 parent 145b2fc commit e0cf0a1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions DebugInfos.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ if (CC_DEBUG) {
"3116": "WebGLRenderingContext.CLAMP_TO_EDGE should be used in NPOT textures", //setTexParameters
"3117": "Mimpap texture only works in POT textures", //generateMipmap
//RectWidth: 3300
"3300": "Rect width exceeds maximum margin: %s", //RectWidth
"3300": "Rect width exceeds maximum margin: %s, max x: %s, texture width: %s", //RectWidth
//RectHeight: 3400
"3400": "Rect height exceeds maximum margin: %s", //RectHeight
"3400": "Rect height exceeds maximum margin: %s, max y: %s, texture height: %s", //RectHeight
//EventManager: 3500
"3500": "0 priority is forbidden for fixed priority since it's used for scene graph based priority.", //addListener
"3501": "Invalid listener type!", //removeListeners
Expand Down
8 changes: 4 additions & 4 deletions cocos2d/core/sprites/CCSpriteFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,11 @@ var SpriteFrame = cc.Class(/** @lends cc.SpriteFrame# */{
maxX += rect.width;
maxY += rect.height;
}
if (maxX > texture.getPixelWidth()) {
cc.errorID(3300, texture.url + '/' + this.name);
if (maxX > texture.width) {
cc.errorID(3300, texture.url + '/' + this.name, maxX, texture.width);
}
if (maxY > texture.getPixelHeight()) {
cc.errorID(3400, texture.url + '/' + this.name);
if (maxY > texture.height) {
cc.errorID(3400, texture.url + '/' + this.name, maxY, texture.height);
}
},

Expand Down
1 change: 1 addition & 0 deletions jsb/jsb-tex-sprite-frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,4 +331,5 @@ prototype.clone = function () {
return cloned;
};

cc.js.getset(prototype, 'texture', prototype.getTexture, prototype.setTexture);
cc.js.addon(prototype, WebSpriteFrame.prototype);
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"jshint-stylish": "2.1.0",
"multipipe": "0.3.0",
"persistify": "^1.1.1",
"require-dir": "0.3.0",
"uglify-es": "^3.0.26",
"vinyl": "1.1.0",
"vinyl-buffer": "1.0.0",
Expand Down

0 comments on commit e0cf0a1

Please sign in to comment.