Commit f147007a authored by techird's avatar techird

先设置好父亲的一些布局属性

parent 314398ad
...@@ -79,10 +79,6 @@ layouts.forEach(function(name) { ...@@ -79,10 +79,6 @@ layouts.forEach(function(name) {
doLayout: function(parent, children) { doLayout: function(parent, children) {
if (!children.length) {
return false;
}
var pbox = parent.getContentBox(); var pbox = parent.getContentBox();
if (axis == 'x') { if (axis == 'x') {
...@@ -93,6 +89,10 @@ layouts.forEach(function(name) { ...@@ -93,6 +89,10 @@ layouts.forEach(function(name) {
parent.setLayoutVectorOut(new kity.Vector(0, dir)); parent.setLayoutVectorOut(new kity.Vector(0, dir));
} }
if (!children.length) {
return false;
}
children.forEach(function(child) { children.forEach(function(child) {
var cbox = child.getContentBox(); var cbox = child.getContentBox();
child.setLayoutTransform(new kity.Matrix()); child.setLayoutTransform(new kity.Matrix());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment