Central node never can be collapsed.

This commit is contained in:
Paulo Gustavo Veiga 2012-11-28 22:09:29 -03:00
parent ebd6f886d5
commit 12448fc6cb
3 changed files with 5 additions and 4 deletions

View File

@ -440,8 +440,9 @@ mindplot.Designer = new Class({
}
// Execute event ...
var topic = nodes[0];
this._actionDispatcher.shrinkBranch([topic.getId()], !topic.areChildrenShrunken());
if (topic.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
this._actionDispatcher.shrinkBranch([topic.getId()], !topic.areChildrenShrunken());
}
},
createChildForSelectedNode:function () {

View File

@ -598,7 +598,7 @@ mindplot.Topic = new Class({
areChildrenShrunken:function () {
var model = this.getModel();
return model.areChildrenShrunken();
return model.areChildrenShrunken() && !this.isCentralTopic();
},
isCollapsed:function () {

View File

@ -92,7 +92,7 @@ mindplot.persistence.XMLSerializer_Pela = new Class({
}
if (topic.areChildrenShrunken()) {
if (topic.areChildrenShrunken() && topic.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
parentTopic.setAttribute('shrink', 'true');
}