mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 15:37:56 +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()){
|
}else if(node.getParent().getId() == this._targetNode.getParent().getId()){
|
||||||
var chkboard = this.getTopicBoardForTopic(this._targetNode.getParent());
|
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(this._createShape == "Sibling_top"){
|
||||||
if(chk.table>this._currentIndex+1){
|
if(chk.table>this._currentIndex+1){
|
||||||
var nextEntry = 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(node.relationship == "Sibling_top"){
|
||||||
if(sibObj.index==0){
|
if(sibObj.index==0){
|
||||||
newNodePos.y = siblingEntry.getPosition();
|
newNodePos.y = siblingEntry.getPosition();
|
||||||
index = 0;
|
|
||||||
}else{
|
}else{
|
||||||
newNodePos.y =siblingEntry.getPosition()-siblingEntry.getTotalMarginTop()+entry.getTotalMarginTop();
|
newNodePos.y =siblingEntry.getPosition()-siblingEntry.getTotalMarginTop()+entry.getTotalMarginTop();
|
||||||
index = sibObj.index-1;
|
|
||||||
}
|
}
|
||||||
|
index = sibObj.index;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
newNodePos.y = siblingEntry.getPosition()+siblingEntry.getTotalMarginBottom() + entry.getTotalMarginTop();
|
newNodePos.y = siblingEntry.getPosition()+siblingEntry.getTotalMarginBottom() + entry.getTotalMarginTop();
|
||||||
|
Loading…
Reference in New Issue
Block a user