Fix delete relationship issue.

This commit is contained in:
Paulo Gustavo Veiga 2012-07-13 21:27:52 -03:00
parent 39e4f18a48
commit 690c359ce2

View File

@ -638,20 +638,23 @@ mindplot.Designer = new Class({
},
_addRelationship:function (model) {
this._mindmap.addRelationship(model);
var mindmap = this.getMindmap();
mindmap.addRelationship(model);
return this._relationshipModelToRelationship(model);
},
_deleteRelationship:function (relationship) {
var sourceTopic = relationship.getSourceTopic();
sourceTopic.deleteRelationship(relationship);
_deleteRelationship:function (rel) {
var sourceTopic = rel.getSourceTopic();
sourceTopic.deleteRelationship(rel);
var targetTopic = relationship.getTargetTopic();
targetTopic.deleteRelationship(relationship);
var targetTopic = rel.getTargetTopic();
targetTopic.deleteRelationship(rel);
this._workspace.removeChild(relationship);
this.getModel().removeRelationship(rel);
this._workspace.removeChild(rel);
this.getModel().removeRelationship(relationship);
var mindmap = this.getMindmap();
mindmap.deleteRelationship(rel.getModel());
},
_buildRelationshipShape:function (model) {