Undo of a deleted topic keep into account if the nodes are visible or not.

main
Paulo Gustavo Veiga 2012-11-17 00:24:17 -03:00
parent be545d7103
commit ca0b5bfcbe
1 changed files with 7 additions and 2 deletions

View File

@ -888,7 +888,12 @@ mindplot.Topic = new Class({
_setRelationshipLinesVisibility:function (value) {
this._relationships.each(function (relationship) {
relationship.setVisibility(value);
var sourceTopic = relationship.getSourceTopic();
var targetTopic = relationship.getTargetTopic();
var targetParent = targetTopic.getModel().getParent();
var sourceParent = sourceTopic.getModel().getParent();
relationship.setVisibility(value && (targetParent == null || !targetParent.areChildrenShrunken()) && (sourceParent == null || !sourceParent.areChildrenShrunken()));
});
},