fixed layout

This commit is contained in:
yinkaile
2018-02-07 10:55:27 +08:00
parent 3bede929af
commit f5cc698007
+2 -2
View File
@@ -765,10 +765,10 @@ var Layout = cc.Class({
});
if (allChildrenBoundingBox) {
var leftBottomInParentSpace = this.node.parent.convertToNodeSpace(cc.p(allChildrenBoundingBox.x, allChildrenBoundingBox.y));
var leftBottomInParentSpace = this.node.parent.convertToNodeSpaceAR(cc.p(allChildrenBoundingBox.x, allChildrenBoundingBox.y));
leftBottomInParentSpace = cc.pAdd(leftBottomInParentSpace, cc.p(-this.paddingLeft, -this.paddingBottom));
var rightTopInParentSpace = this.node.parent.convertToNodeSpace(cc.p(allChildrenBoundingBox.x + allChildrenBoundingBox.width,
var rightTopInParentSpace = this.node.parent.convertToNodeSpaceAR(cc.p(allChildrenBoundingBox.x + allChildrenBoundingBox.width,
allChildrenBoundingBox.y + allChildrenBoundingBox.height));
rightTopInParentSpace = cc.pAdd(rightTopInParentSpace, cc.p(this.paddingRight, this.paddingTop));