mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
fixing node reparenting
This commit is contained in:
parent
9499f579b9
commit
9532c95831
@ -390,7 +390,8 @@ mindplot.layoutManagers.FreeMindLayoutManager = mindplot.layoutManagers.BaseLayo
|
||||
}
|
||||
}else if(node.getParent().getId() == this._targetNode.getParent().getId()){
|
||||
var chkboard = this.getTopicBoardForTopic(this._targetNode.getParent());
|
||||
var chk = chkboard.findNodeEntryIndex(node);
|
||||
var mod = this._modifiedTopics.get(node.getId());
|
||||
var chk = chkboard.findNodeEntryIndex(node, mod.originalPos);
|
||||
if(this._createShape == "Sibling_top"){
|
||||
if(chk.table>this._currentIndex+1){
|
||||
var nextEntry = chk.table[this._currentIndex+1];
|
||||
@ -583,11 +584,10 @@ mindplot.layoutManagers.FreeMindLayoutManager = mindplot.layoutManagers.BaseLayo
|
||||
if(node.relationship == "Sibling_top"){
|
||||
if(sibObj.index==0){
|
||||
newNodePos.y = siblingEntry.getPosition();
|
||||
index = 0;
|
||||
}else{
|
||||
newNodePos.y =siblingEntry.getPosition()-siblingEntry.getTotalMarginTop()+entry.getTotalMarginTop();
|
||||
index = sibObj.index-1;
|
||||
}
|
||||
index = sibObj.index;
|
||||
}
|
||||
else{
|
||||
newNodePos.y = siblingEntry.getPosition()+siblingEntry.getTotalMarginBottom() + entry.getTotalMarginTop();
|
||||
|
Loading…
Reference in New Issue
Block a user