after:
cc.EGLView.getInstance().setDesignResolutionSize(width, height, cc.RESOLUTION_POLICY.SHOW_ALL);
FF,Chrome,IE
QQ图片20140121133557.jpg (76.8 KB)
after:
cc.EGLView.getInstance().setDesignResolutionSize(width, height, cc.RESOLUTION_POLICY.SHOW_ALL);
FF,Chrome,IE
QQ图片20140121133557.jpg (76.8 KB)
I means position not correct(I set ignoreAnchorPointForPosition(false) position(0,0) setAnchorPoint(0,0) to (1,1) no effect )
second setpoistion(cc.p()) is not worked, because
if (arguments.length == 2) {
this.*position.*x = x;
this.*position.*y = y;
//this.*position = cc.p;
} else {
this.*position = x;
}
this.setNodeDirty();
this.dom.translates(this.*position.*x, -this.*position.*y);
point should has *x,*y, and just setPosition(x,y) is woked, but is incorrect with start position(anchorpoint?).
that’s one of BUG #2245, but not only, i had fixed it on my system and problem still, and same code not same effect. effect same as the picture
Thanks for noticing.
Here is the new fixed: https://github.com/cocos2d/cocos2d-html5/pull/1519
please update the codes and try again.
Thanks again.
David
problem still with AnchorPoint
sample code
var editBox = cc.EditBox.create(label.getContentSize(), cc.Scale9Sprite.create());
editBox.setAnchorPoint(label.getAnchorPoint());
editBox.setPosition(label.getPosition());
label.getParent().addChild(editBox);
label.removeFromParent();
Position still not same in ie firefox chrome and native jsb