From ed37b20dfcfad80fe7a95e93ab5a934716b0e50c Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 17 Nov 2012 14:38:34 -0300 Subject: [PATCH] Add debug info. --- mindplot/src/main/javascript/Designer.js | 3 +++ mindplot/src/main/javascript/model/RelationshipModel.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mindplot/src/main/javascript/Designer.js b/mindplot/src/main/javascript/Designer.js index 8b9cbb76..6ae482a1 100644 --- a/mindplot/src/main/javascript/Designer.js +++ b/mindplot/src/main/javascript/Designer.js @@ -697,6 +697,9 @@ mindplot.Designer = new Class({ var targetTopicId = model.getToNode(); var targetTopic = dmodel.findTopicById(targetTopicId); + $assert(targetTopic, "targetTopic could not be found:" + targetTopicId + dmodel.getTopics().forEach(function (e) { + return e.getId() + })); // Build relationship line .... var result = new mindplot.Relationship(sourceTopic, targetTopic, model); diff --git a/mindplot/src/main/javascript/model/RelationshipModel.js b/mindplot/src/main/javascript/model/RelationshipModel.js index 55f909e7..8bd0885e 100644 --- a/mindplot/src/main/javascript/model/RelationshipModel.js +++ b/mindplot/src/main/javascript/model/RelationshipModel.js @@ -93,7 +93,7 @@ mindplot.model.RelationshipModel = new Class({ this._startArrow = startArrow; }, - clone:function (model) { + clone:function () { var result = new mindplot.model.RelationshipModel(this._sourceTargetId, this._targetTopicId); result._id = this._id; result._lineType = this._lineType;