New issue
 Projects > js > Issues > Bug #3048

cc.Rect Clone

Bug #3048 [Closed]
tiz 2013-10-24 02:22 . Updated about 3 years ago

for cc.rect in cocos2d/cocoa/CCGeometry.js

var a = cc.rect(0,0,30,30); // works
var b = cc.rect(a); // don’t works

I’m not sure but I think the bug is in cc.rect
cc.rect = function (x, y, w, h) {
return new cc.Rect(x,y,w,h); // cc.Rect has always 4 arguments passed and never see 0,1,2 or 3 arguments
};

linshun 2013-10-28 13:47
  • Assignee set to ludingping
ludingping 2013-10-31 14:10
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:f7f72e3d3f03986c81f77e15183e50aede2fc701.

Atom PDF

Status:Closed
Start date:2013-10-24
Priority:Low
Due date:
Assignee:ludingping
% Done:

100%

Category:-
Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.