Commit 12061327 authored by Akikonata's avatar Akikonata

dev

parent 688bbc52
...@@ -55,24 +55,42 @@ ...@@ -55,24 +55,42 @@
}, },
text:"I am the root", text:"I am the root",
}; };
minder.select(_node);
var _childnode = new MinderNode(); // var _childnode = new MinderNode();
_node.insertChild(_childnode); // _node.insertChild(_childnode);
_childnode.data = { // _childnode.data = {
centerX:minderWidth/2+150, // centerX:minderWidth/2+150,
centerY:minderHeight/2+100, // centerY:minderHeight/2+100,
style:{ // style:{
radius:10, // radius:10,
fill:"yellow", // fill:"yellow",
stroke:"orange", // stroke:"orange",
color:"black", // strokeWidth:2,
padding:[10,10,10,10], // color:"black",
fontSize:12 // padding:[10,10,10,10],
}, // fontSize:12
text:"node", // },
}; // text:"childnode1",
// };
// var _childnode2 = new MinderNode();
// _node.insertChild(_childnode2);
// _childnode2.data = {
// centerX:minderWidth/2+250,
// centerY:minderHeight/2+10,
// style:{
// radius:10,
// fill:"yellow",
// stroke:"orange",
// color:"black",
// padding:[10,10,10,10],
// fontSize:12
// },
// text:"childnode2",
// };
minder.execCommand("rendernode",_node); minder.execCommand("rendernode",_node);
console.log(_childnode); // minder.execCommand("rendernode",_childnode);
minder.execCommand("rendernode",_childnode); // minder.execCommand("rendernode",_childnode2);
</script> </script>
</html> </html>
\ No newline at end of file
...@@ -8,7 +8,7 @@ KityMinder.registerModule( "LayoutModule", function () { ...@@ -8,7 +8,7 @@ KityMinder.registerModule( "LayoutModule", function () {
} }
} }
} )() ); } )() );
var CreateSiblingNodeCommand = kity.createClass( "reateSiblingNodeCommand", ( function () { var CreateSiblingNodeCommand = kity.createClass( "CreateSiblingNodeCommand", ( function () {
return { return {
base: Command, base: Command,
......
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