Add IMindmap and INode.

This commit is contained in:
Paulo Veiga
2011-09-08 10:03:42 -03:00
parent 21f848e3df
commit 0c216778e5
21 changed files with 248 additions and 149 deletions

View File

@@ -74,7 +74,7 @@ mindplot.layout.BaseLayoutManager = new Class({
},
_isCentralTopic:function(node){
var type = node.getModel().getType();
return type == mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE;
return type == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE;
},
getClassName:function(){
return mindplot.layout.BaseLayoutManager.NAME;

View File

@@ -58,7 +58,7 @@ mindplot.layout.FreeMindLayoutManager = mindplot.layout.BaseLayoutManager.extend
});
// Add drag behaviour ...
if (topic.getType() != mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE)
if (topic.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE)
{
topic.addEvent("mousedown",this._reconnectMouseDownListener.bindWithEvent(this,[topic]));
}
@@ -261,7 +261,7 @@ mindplot.layout.FreeMindLayoutManager = mindplot.layout.BaseLayoutManager.extend
}
},
addHelpers:function(node){
if (node.getType() != mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE)
if (node.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE)
this._addMoveHelper(node);
},
_addMoveHelper:function(node){

View File

@@ -61,7 +61,7 @@ mindplot.layout.OriginalLayoutManager = new Class({
}
}
nodesByOrder = null;
return node.getTopicType() != mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE ? result : children;
return node.getTopicType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE ? result : children;
},
_nodeResizeEvent:function(node) {
@@ -123,7 +123,7 @@ mindplot.layout.OriginalLayoutManager = new Class({
registerListenersOnNode : function(topic) {
// Register node listeners ...
if (topic.getType() != mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE) {
if (topic.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
// Central Topic doesn't support to be dragged
var dragger = this._dragger;