Commit 688bbc52 authored by Akikonata's avatar Akikonata

dev

parent 780aacca
......@@ -71,10 +71,8 @@
},
text:"node",
};
console.log(minderWidth,minderHeight);
minder.execCommand("rendernode",minder,_node);
minder.execCommand("rendernode",minder,_childnode);
minder.execCommand("rendernode",_node);
console.log(_childnode);
minder.execCommand("rendernode",_childnode);
</script>
</html>
\ No newline at end of file
......@@ -20,6 +20,7 @@ kity.extendClass( Minder, {
},
execCommand: function ( name ) {
var TargetCommand, command, cmdArgs, eventParams, stoped, isTopCommand, result;
var me = this;
TargetCommand = this._getCommand( name );
if ( !TargetCommand ) {
......@@ -49,7 +50,7 @@ kity.extendClass( Minder, {
if ( !stoped ) {
this._fire( new MinderEvent( "precommand", eventParams, false ) );
result = command.execute.apply( command, [ this ].concat( cmdArgs ) );
result = command.execute.apply( command, [ me ].concat( cmdArgs ) );
this._fire( new MinderEvent( "command", eventParams, false ) );
// 顶级命令才触发事件
......
......@@ -139,13 +139,11 @@ var ConnectModule = KityMinder.registerModule( "ConnectModule", function () {
switch ( command.commandName ) {
case "rendernode":
( function () {
var minder = command.commandArgs[ 0 ];
var node = command.commandArgs[ 1 ];
var node = command.commandArgs[ 0 ];
if ( !node.getParent() ) {
return false;
} else {
var parent = node.getParent();
console.log( "parent", node.getParent() );
var _connect = new ConnectBezier( parent.getRenderContainer(), node.getRenderContainer() );
_connect.stroke( new kity.Pen( node.data.style.stroke, node.data.style.strokeWidth ) );
node.connect = _connect;
......
......@@ -38,7 +38,6 @@ KityMinder.registerModule( "RenderModule", function () {
return {
base: Command,
execute: function ( km, node ) {
console.log( "minderHHH", km )
renderNode( km, node );
}
};
......
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