Commit 688bbc52 authored by Akikonata's avatar Akikonata

dev

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