From 09237a13b5c2652a58365915b03083921a97a5bc Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Fri, 9 Sep 2011 22:03:31 -0300 Subject: [PATCH] Fix several issues. --- .../collaboration/framework/brix/model/Mindmap.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mindplot/src/main/javascript/collaboration/framework/brix/model/Mindmap.js b/mindplot/src/main/javascript/collaboration/framework/brix/model/Mindmap.js index 784d853a..32e8196c 100644 --- a/mindplot/src/main/javascript/collaboration/framework/brix/model/Mindmap.js +++ b/mindplot/src/main/javascript/collaboration/framework/brix/model/Mindmap.js @@ -77,8 +77,13 @@ mindplot.collaboration.framework.brix.model.Mindmap = new Class({ $assert(nodeModel.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE, "central topic can not be removed"); var branches = this._brixModel.get("branches"); - var brixModel = nodeModel.getBrixModel(); - branches.remove(brixModel); + for (var i = 0; i < branches.size(); i++) { + if (branches.get(i) == nodeModel.getBrixModel()) { + branches.remove(i); + break; + + } + } }, createNode : function(type, id) {