working on Freemind layout algorithm

This commit is contained in:
Pablo Luna
2011-04-08 15:31:40 +01:00
parent ae071f7fcb
commit d4de03d373
20 changed files with 472 additions and 144 deletions

View File

@@ -126,16 +126,16 @@ mindplot.Mindmap.prototype.hasAlreadyAdded = function(node)
}
};
mindplot.Mindmap.prototype.createNode = function(type)
mindplot.Mindmap.prototype.createNode = function(type, id)
{
core.assert(type, "node type can not be null");
return this._createNode(type);
return this._createNode(type, id);
};
mindplot.Mindmap.prototype._createNode = function(type)
mindplot.Mindmap.prototype._createNode = function(type, id)
{
core.assert(type, 'Node type must be specified.');
var result = new mindplot.NodeModel(type, this);
var result = new mindplot.NodeModel(type, this, id);
return result;
};