mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
convertToWorldSpace should not support omitted argument
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user