Commit d17305ff authored by Akikonata's avatar Akikonata

fixed select bug

parent 158f30b6
......@@ -60,9 +60,7 @@ KityMinder.registerModule( "KeyboardModule", function () {
buildPositionNetwork( this.getRoot() );
},
keydown: function ( e ) {
switch ( e.originEvent.keyCode ) {
case keymap.Enter:
this.execCommand( 'appendSiblingNode', new MinderNode( 'Topic' ) );
e.preventDefault();
......
......@@ -131,11 +131,11 @@ KityMinder.registerModule( "LayoutModule", function () {
for ( var i = 0; i < selectedNodes.length; i++ ) {
_buffer.push( selectedNodes[ i ] );
}
while ( _buffer.length !== 1 ) {
do {
var parent = _buffer[ 0 ].getParent();
if ( parent && _buffer.indexOf( parent ) === -1 ) _buffer.push( parent );
_buffer.shift();
}
} while ( _buffer.length !== 1 );
km.removeNode( selectedNodes );
km.select( _buffer[ 0 ] );
}
......@@ -153,6 +153,9 @@ KityMinder.registerModule( "LayoutModule", function () {
"ready": function () {
this.setDefaultOptions( 'layoutstyle', this.getLayoutStyleItems() );
switchLayout( this, this.getOptions( 'defaultlayoutstyle' ) );
},
"click": function ( e ) {
}
},
"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