Commit 072c2633 authored by Akikonata's avatar Akikonata

dev

parent 41be9143
KityMinder.registerModule( "LayoutModule", function () {
var CreateChildNodeCommand = kity.createClass( "CreateChildNodeCommand", ( function () {
return {
base: Command,
execute: function ( km, parent ) {
var _node = new MinderNode();
var _nodeD = {
text: "New Node",
x: parent.getData( "data" ).x + 200,
y: Math.random() * 300 + 100,
align: "left"
};
switch ( parent.branchside ) {
case "left":
break;
case "right":
break;
default:
if ( parent ) {} else {}
break;
}
}
_node.setData( "data", _nodeD );
parent.insertChild( _node );
km.execCommand( 'rendernode', _node );
return _node;
}
var CreateChildNodeCommand = kity.createClass( "CreateChildNodeCommand", ( function () {
return {
base: Command,
execute: function ( km, parent ) {
var _node = new MinderNode();
var _nodeD = {
text: "New Node",
x: parent.getData( "data" ).x + 200,
y: Math.random() * 300 + 100,
align: "left"
};
_node.setData( "data", _nodeD );
parent.insertChild( _node );
km.execCommand( 'rendernode', _node );
return _node;
}
} )() );
}
} )() );
var CreateSiblingNodeCommand = kity.createClass( "CreateSiblingNodeCommand", ( function () {
return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment