Keyboard actions for adding is working with the new layout...

This commit is contained in:
Paulo Veiga
2012-01-11 21:12:22 -03:00
parent d9cdcc5160
commit 51bc3e563a
8 changed files with 110 additions and 166 deletions

View File

@@ -53,31 +53,6 @@ mindplot.CentralTopic = new Class({
return false;
},
createChildModel : function(prepositionate) {
// Create a new node ...
var model = this.getModel();
var mindmap = model.getMindmap();
var childModel = mindmap.createNode(mindplot.model.INodeModel.MAIN_TOPIC_TYPE);
if (prepositionate) {
if (!$defined(this.___siblingDirection)) {
this.___siblingDirection = 1;
}
// Position following taking into account this internal flag ...
if (this.___siblingDirection == 1) {
childModel.setPosition(150, 0);
} else {
childModel.setPosition(-150, 0);
}
this.___siblingDirection = -this.___siblingDirection;
}
// Create a new node ...
childModel.setOrder(0);
return childModel;
},
_defaultShapeType : function() {
return mindplot.model.INodeModel.SHAPE_TYPE_ROUNDED_RECT;