mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-23 03:43:48 +01:00
- Remove visibility flag on createTopic.
This commit is contained in:
parent
4a0d70e3b3
commit
f6e5018272
@ -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;
|
||||
|
@ -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 () {
|
||||
|
@ -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) {
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user