Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cocos2d/base_nodes/CCNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -2318,7 +2318,7 @@ cc.NodeCanvas = cc.Class.extend(/** @lends cc.NodeCanvas# */{
*/
setScale:function (scale, scaleY) {
this._scaleX = scale;
this._scaleY = scaleY || scale;
this._scaleY = scaleY === undefined ? scale : scaleY;
this.setNodeDirty();
},

Expand Down
8 changes: 4 additions & 4 deletions cocos2d/cocoa/CCAffineTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ cc.RectApplyAffineTransform = function (rect, anAffineTransform) {
var bottomLeft = cc.PointApplyAffineTransform(cc.p(left, bottom), anAffineTransform);
var bottomRight = cc.PointApplyAffineTransform(cc.p(right, bottom), anAffineTransform);

var minX = Math.min(Math.min(topLeft.x, topRight.x), Math.min(bottomLeft.x, bottomRight.x));
var maxX = Math.max(Math.max(topLeft.x, topRight.x), Math.max(bottomLeft.x, bottomRight.x));
var minY = Math.min(Math.min(topLeft.y, topRight.y), Math.min(bottomLeft.y, bottomRight.y));
var maxY = Math.max(Math.max(topLeft.y, topRight.y), Math.max(bottomLeft.y, bottomRight.y));
var minX = Math.min(topLeft.x, topRight.x, bottomLeft.x, bottomRight.x);
var maxX = Math.max(topLeft.x, topRight.x, bottomLeft.x, bottomRight.x);
var minY = Math.min(topLeft.y, topRight.y, bottomLeft.y, bottomRight.y);
var maxY = Math.max(topLeft.y, topRight.y, bottomLeft.y, bottomRight.y);

return cc.rect(minX, minY, (maxX - minX), (maxY - minY));
};
Expand Down