convertToWorldSpace should not support omitted argument

This commit is contained in:
Jare Guo
2016-05-25 10:27:38 +08:00
parent 3c4f744446
commit f66705b0d4
2 changed files with 0 additions and 10 deletions
-2
View File
@@ -1831,7 +1831,6 @@ _ccsg.Node = cc.Class({
* @return {cc.Vec2}
*/
convertToWorldSpace: function (nodePoint) {
nodePoint = nodePoint || cc.p(0,0);
return cc.pointApplyAffineTransform(nodePoint, this.getNodeToWorldTransform());
},
@@ -1854,7 +1853,6 @@ _ccsg.Node = cc.Class({
* @return {cc.Vec2}
*/
convertToWorldSpaceAR: function (nodePoint) {
nodePoint = nodePoint || cc.p(0,0);
var pt = cc.pAdd(nodePoint, this._renderCmd.getAnchorPointInPoints());
return this.convertToWorldSpace(pt);
},
-8
View File
@@ -1501,10 +1501,6 @@ var BaseNode = cc.Class(/** @lends cc.Node# */{
// ensure transform computed
cc.director._visitScene();
}
if (CC_JSB) {
// should also support omit argument in JSB
nodePoint = nodePoint || new cc.Vec2(0, 0);
}
var worldPositionIgnoreAnchorPoint = this._sgNode.convertToWorldSpace(nodePoint);
return cc.pSub(worldPositionIgnoreAnchorPoint, cc.p(this._anchorPoint.x * this._contentSize.width, this._anchorPoint.y * this._contentSize.height));
},
@@ -1556,10 +1552,6 @@ var BaseNode = cc.Class(/** @lends cc.Node# */{
}
if (this._sgNode.isIgnoreAnchorPointForPosition()) {
// see https://github.com/cocos-creator/engine/pull/391
if (CC_JSB) {
// should also support omit argument in JSB
nodePoint = nodePoint || new cc.Vec2(0, 0);
}
return cc.v2(this._sgNode.convertToWorldSpace(nodePoint));
}
else {