mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 23:44:54 +01:00
Merge fix
This commit is contained in:
parent
3435bd17c2
commit
93cf061f4c
@ -1,5 +1,5 @@
|
||||
mindplot.nlayout.GridSorter = new Class({
|
||||
Extends: mindplot.nlayout.SymetricSorder,
|
||||
Extends: mindplot.nlayout.SymetricSorter,
|
||||
|
||||
computeOffsets: function(treeSet, node) {
|
||||
$assert(treeSet, "treeSet can no be null.");
|
||||
|
@ -83,7 +83,10 @@ mindplot.nlayout.OriginalLayout = new Class({
|
||||
|
||||
var verticalOffset = (node.getSize().height / 2);
|
||||
|
||||
var newPos = {x:parentX + offset.x,y:parentY + offset.y + verticalOffset};
|
||||
//TODO(gb): Not sure why verticalOffset is added again, since it is considered in the layout
|
||||
var newPos = {x:parentX + offset.x,y:parentY + offset.y};
|
||||
// var newPos = {x:parentX + offset.x,y:parentY + offset.y + verticalOffset};
|
||||
|
||||
this._treeSet.updateBranchPosition(child, newPos);
|
||||
}.bind(this));
|
||||
|
||||
@ -98,9 +101,8 @@ mindplot.nlayout.OriginalLayout = new Class({
|
||||
|
||||
});
|
||||
|
||||
mindplot.nlayout.OriginalLayout.SYMETRIC_SORTER = new mindplot.nlayout.SymetricSorder();
|
||||
mindplot.nlayout.OriginalLayout.SYMETRIC_SORTER = new mindplot.nlayout.SymetricSorter();
|
||||
mindplot.nlayout.OriginalLayout.GRID_SORTER = new mindplot.nlayout.GridSorter();
|
||||
//mindplot.nlayout.OriginalLayout.GRID_SORTER = new mindplot.nlayout.SymetricSorder();
|
||||
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
mindplot.nlayout.SymetricSorder = new Class({
|
||||
mindplot.nlayout.SymetricSorter = new Class({
|
||||
Extends: mindplot.nlayout.ChildrenSorterStrategy,
|
||||
initialize:function() {
|
||||
|
||||
@ -11,7 +11,7 @@ mindplot.nlayout.SymetricSorder = new Class({
|
||||
},
|
||||
|
||||
_computeChildrenHeight : function(treeSet, node, heightCache) {
|
||||
var height = node.getSize().height + (mindplot.nlayout.SymetricSorder.INTERNODE_VERTICAL_PADDING * 2); // 2* Top and down padding;
|
||||
var height = node.getSize().height + (mindplot.nlayout.SymetricSorter.INTERNODE_VERTICAL_PADDING * 2); // 2* Top and down padding;
|
||||
|
||||
var result;
|
||||
var children = treeSet.getChildren(node);
|
||||
@ -57,7 +57,7 @@ mindplot.nlayout.SymetricSorder = new Class({
|
||||
// Ok, no overlap. Suggest a new order.
|
||||
if (result) {
|
||||
var last = children.getLast();
|
||||
result = [last.getOrder() + 1,{x:cpos.x,y:cpos.y - (mindplot.nlayout.SymetricSorder.INTERNODE_VERTICAL_PADDING * 4)}];
|
||||
result = [last.getOrder() + 1,{x:cpos.x,y:cpos.y - (mindplot.nlayout.SymetricSorter.INTERNODE_VERTICAL_PADDING * 4)}];
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -133,7 +133,7 @@ mindplot.nlayout.SymetricSorder = new Class({
|
||||
ysum = ysum - heights[i].height;
|
||||
|
||||
var yOffset = ysum + heights[i].height/2;
|
||||
var xOffset = node.getSize().width + mindplot.nlayout.SymetricSorder.INTERNODE_HORIZONTAL_PADDING;
|
||||
var xOffset = node.getSize().width + mindplot.nlayout.SymetricSorter.INTERNODE_HORIZONTAL_PADDING;
|
||||
|
||||
$assert(!isNaN(xOffset), "xOffset can not be null");
|
||||
$assert(!isNaN(yOffset), "yOffset can not be null");
|
||||
@ -149,7 +149,7 @@ mindplot.nlayout.SymetricSorder = new Class({
|
||||
}
|
||||
});
|
||||
|
||||
mindplot.nlayout.SymetricSorder.INTERNODE_VERTICAL_PADDING = 5;
|
||||
mindplot.nlayout.SymetricSorder.INTERNODE_HORIZONTAL_PADDING = 5;
|
||||
mindplot.nlayout.SymetricSorter.INTERNODE_VERTICAL_PADDING = 5;
|
||||
mindplot.nlayout.SymetricSorter.INTERNODE_HORIZONTAL_PADDING = 5;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user