diff --git a/mindplot/src/main/javascript/Designer.js b/mindplot/src/main/javascript/Designer.js index c8c54296..b3018be1 100644 --- a/mindplot/src/main/javascript/Designer.js +++ b/mindplot/src/main/javascript/Designer.js @@ -556,7 +556,7 @@ mindplot.Designer = new Class({ for (var i = 0; i < branches.length; i++) { // NodeModel -> NodeGraph ... var nodeModel = branches[i]; - var nodeGraph = this._nodeModelToNodeGraph(nodeModel, false); + var nodeGraph = this._nodeModelToNodeGraph(nodeModel); // Update shrink render state... nodeGraph.setBranchVisibility(true); @@ -594,7 +594,7 @@ mindplot.Designer = new Class({ return this._options.readOnly; }, - _nodeModelToNodeGraph:function (nodeModel, isVisible) { + _nodeModelToNodeGraph:function (nodeModel) { $assert(nodeModel, "Node model can not be null"); var children = nodeModel.getChildren().slice(); children = children.sort(function (a, b) { @@ -603,15 +603,11 @@ mindplot.Designer = new Class({ var nodeGraph = this._buildNodeGraph(nodeModel, this.isReadOnly()); - if (isVisible) { - nodeGraph.setVisibility(isVisible); - } - this._workspace.appendChild(nodeGraph); for (var i = 0; i < children.length; i++) { var child = children[i]; if ($defined(child)) - this._nodeModelToNodeGraph(child, false); + this._nodeModelToNodeGraph(child); } return nodeGraph; diff --git a/mindplot/src/main/javascript/StandaloneActionDispatcher.js b/mindplot/src/main/javascript/StandaloneActionDispatcher.js index 6990ab87..fb33988e 100644 --- a/mindplot/src/main/javascript/StandaloneActionDispatcher.js +++ b/mindplot/src/main/javascript/StandaloneActionDispatcher.js @@ -259,9 +259,9 @@ mindplot.CommandContext = new Class({ this._designer._removeTopic(topic); }, - createTopic:function (model, isVisible) { + createTopic:function (model) { $assert(model, "model can not be null"); - return this._designer._nodeModelToNodeGraph(model, isVisible); + return this._designer._nodeModelToNodeGraph(model); }, createModel:function () { diff --git a/mindplot/src/main/javascript/commands/AddTopicCommand.js b/mindplot/src/main/javascript/commands/AddTopicCommand.js index 30e673a3..00665db7 100644 --- a/mindplot/src/main/javascript/commands/AddTopicCommand.js +++ b/mindplot/src/main/javascript/commands/AddTopicCommand.js @@ -32,7 +32,7 @@ mindplot.commands.AddTopicCommand = new Class({ this._models.each(function (model, index) { // Add a new topic ... - var topic = commandContext.createTopic(model, false); + var topic = commandContext.createTopic(model); // Connect to topic ... if (this._parentsIds) { diff --git a/mindplot/src/main/javascript/commands/DeleteCommand.js b/mindplot/src/main/javascript/commands/DeleteCommand.js index b19c5f2c..3eb366f3 100644 --- a/mindplot/src/main/javascript/commands/DeleteCommand.js +++ b/mindplot/src/main/javascript/commands/DeleteCommand.js @@ -81,8 +81,7 @@ mindplot.commands.DeleteCommand = new Class({ }, this); // Do they need to be connected ? - this._deletedTopicModels.each(function (model, index) { - var topicModel = this._deletedTopicModels[index]; + this._deletedTopicModels.each(function (topicModel, index) { var topics = commandContext.findTopics(topicModel.getId()); var parentId = this._parentTopicIds[index];