Commit 47a399be authored by Akikonata's avatar Akikonata

test

parent d6858fca
...@@ -518,6 +518,9 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -518,6 +518,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
} }
} }
} }
},
expandNode: function ( node ) {
} }
}; };
this.addLayoutStyle( "default", _style ); this.addLayoutStyle( "default", _style );
......
...@@ -25,6 +25,7 @@ KityMinder.registerModule( "LayoutModule", function () { ...@@ -25,6 +25,7 @@ KityMinder.registerModule( "LayoutModule", function () {
}, },
initStyle: function () { initStyle: function () {
var curStyle = this.getCurrentStyle(); var curStyle = this.getCurrentStyle();
this.getRenderContainer().clear();
this.getLayoutStyle( curStyle ).initStyle.call( this ); this.getLayoutStyle( curStyle ).initStyle.call( this );
}, },
appendChildNode: function ( parent, node, index ) { appendChildNode: function ( parent, node, index ) {
...@@ -42,6 +43,10 @@ KityMinder.registerModule( "LayoutModule", function () { ...@@ -42,6 +43,10 @@ KityMinder.registerModule( "LayoutModule", function () {
updateLayout: function ( node ) { updateLayout: function ( node ) {
var curStyle = this.getCurrentStyle(); var curStyle = this.getCurrentStyle();
this.getLayoutStyle( curStyle ).updateLayout.call( this, node ); this.getLayoutStyle( curStyle ).updateLayout.call( this, node );
},
expandNode: function ( node ) {
var curStyle = this.getCurrentStyle();
this.getLayoutStyle( curStyle ).expandNode.call( this, node );
} }
} ); } );
kity.extendClass( MinderNode, { kity.extendClass( MinderNode, {
...@@ -155,7 +160,10 @@ KityMinder.registerModule( "LayoutModule", function () { ...@@ -155,7 +160,10 @@ KityMinder.registerModule( "LayoutModule", function () {
switchLayout( this, this.getOptions( 'defaultlayoutstyle' ) ); switchLayout( this, this.getOptions( 'defaultlayoutstyle' ) );
}, },
"click": function ( e ) { "click": function ( e ) {
var ico = e.kityEvent.targetShape.container;
if ( ico.class === "shicon" ) {
this.expandNode( ico.icon._node );
}
} }
}, },
"defaultOptions": { "defaultOptions": {
......
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