Commit c1aa09cd authored by Akikonata's avatar Akikonata

changed layout

parent 65e58fb0
Subproject commit 5382742eb5b1764af2bb4fdf4fa7565318bfbb78
Subproject commit 7c5ee097334581f51ae994ff3c5d51f96d5ac260
......@@ -33,6 +33,7 @@ KityMinder.registerLayout('bottom', kity.createClass({
return box;
});
var nodeContentBox = node.getContentBox();
node.setLayoutVector(new kity.Vector(nodeContentBox.cx - 5, nodeContentBox.bottom));
var i, x, y, child, childTreeBox, childContentBox;
var transform = new kity.Matrix();
x = -totalTreeWidth / 2;
......@@ -50,7 +51,6 @@ KityMinder.registerLayout('bottom', kity.createClass({
y = nodeContentBox.height + node.getStyle('margin-bottom') + children[i].getStyle('margin-top');
children[i].setLayoutTransform(new kity.Matrix().translate(x, y));
x += childTreeBox.width / 2 + children[i].getStyle('margin-right');
child.setLayoutVector(new kity.Vector(childContentBox.cx - 5, childContentBox.bottom));
}
}
}
......@@ -64,6 +64,5 @@ KityMinder.registerConnectProvider('bottom', function(node, parent, connection)
pathData.push('L', new kity.Point(pBox.cx, pBox.bottom + parent.getStyle('margin-bottom')));
pathData.push('L', new kity.Point(box.cx, pBox.bottom + parent.getStyle('margin-bottom')));
pathData.push('L', new kity.Point(box.cx, box.top));
console.log(pathData);
connection.setPathData(pathData);
});
\ No newline at end of file
......@@ -28,6 +28,7 @@ KityMinder.registerLayout('filetree', kity.createClass({
return box;
});
var nodeContentBox = node.getContentBox();
node.setLayoutVector(new kity.Vector(nodeContentBox.left + 6, nodeContentBox.bottom));
var i, x, y, child, childTreeBox, childContentBox;
var transform = new kity.Matrix();
y = nodeContentBox.bottom + node.getStyle('margin-bottom');
......@@ -41,7 +42,6 @@ KityMinder.registerLayout('filetree', kity.createClass({
y += child.getStyle('margin-top');
child.setLayoutTransform(new kity.Matrix().translate(x, y));
y += childTreeBox.height + children[i].getStyle('margin-bottom');
child.setLayoutVector(new kity.Vector(childContentBox.left + 6, childContentBox.bottom));
}
}
},
......
......@@ -14,7 +14,7 @@ KityMinder.registerTheme('bottom', {
'main-font-size': 16,
'main-padding': [6, 20],
'main-margin': [30, 0, 10, 0],
'main-radius': 10,
'main-radius': 5,
'main-space': 5,
'sub-color': 'white',
......
......@@ -14,7 +14,7 @@ KityMinder.registerTheme('filetree', {
'main-font-size': 16,
'main-padding': [6, 20],
'main-margin': [15, 15, 15, 10],
'main-radius': 10,
'main-radius': 0,
'main-space': 5,
'sub-color': 'black',
......@@ -23,7 +23,7 @@ KityMinder.registerTheme('filetree', {
'sub-font-size': 12,
'sub-padding': [5, 10],
'sub-margin': [15, 15, 15, 10],
'sub-radius': 5,
'sub-radius': 0,
'sub-space': 5,
'connect-color': 'white',
......
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