Skip to content

Commit 823b528

Browse files
committed
Merge pull request cocos2d#1607 from dingpinglv/Iss4155_EditboxBug
Closed #4155: fixed a bug of cc.EditBox which its position is wrong when it isn't root node.
2 parents b6ccd69 + e00a533 commit 823b528

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

extensions/CCEditBox/CCdomNode.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ cc.DOM.methods = /** @lends cc.DOM# */{
5353
} else {
5454
this._position._x = x;
5555
this._position._y = y;
56-
//this._position = cc.p(newPosOrxValue,yValue);
5756
}
5857
this.setNodeDirty();
5958
this.dom.translates(this._position._x, -this._position._y);
@@ -124,13 +123,9 @@ cc.DOM.methods = /** @lends cc.DOM# */{
124123
setAnchorPoint:function (point, y) {
125124
var locAnchorPoint = this._anchorPoint;
126125
if (y === undefined) {
127-
if ((point.x === locAnchorPoint._x) && (point.y === locAnchorPoint._y))
128-
return;
129126
locAnchorPoint._x = point.x;
130127
locAnchorPoint._y = point.y;
131128
} else {
132-
if ((point === locAnchorPoint._x) && (y === locAnchorPoint._y))
133-
return;
134129
locAnchorPoint._x = point;
135130
locAnchorPoint._y = y;
136131
}
@@ -157,13 +152,9 @@ cc.DOM.methods = /** @lends cc.DOM# */{
157152
setContentSize:function (size, height) {
158153
var locContentSize = this._contentSize;
159154
if (height === undefined) {
160-
if ((size.width === locContentSize._width) && (size.height === locContentSize._height))
161-
return;
162155
locContentSize._width = size.width;
163156
locContentSize._height = size.height;
164157
} else {
165-
if ((size === locContentSize._width) && (height === locContentSize._height))
166-
return;
167158
locContentSize._width = size;
168159
locContentSize._height = height;
169160
}

0 commit comments

Comments
 (0)