Commit aba6baec authored by campaign's avatar campaign

Merge branch 'dev' of https://github.com/kitygraph/kityminder into dev

parents 54d0903c b96701df
......@@ -110,8 +110,17 @@ KityMinder.registerModule( "LayoutModule", function () {
base: Command,
execute: function ( km ) {
var selectedNodes = km.getSelectedNodes();
console.log( selectedNodes );
var _buffer = [];
for ( var i = 0; i < selectedNodes.length; i++ ) {
_buffer.push( selectedNodes[ i ] );
}
while ( _buffer.length !== 1 ) {
var parent = _buffer[ 0 ].getParent();
if ( parent && _buffer.indexOf( parent ) === -1 ) _buffer.push( parent );
_buffer.shift();
}
km.removeNode( selectedNodes );
km.select( _buffer[ 0 ] );
}
};
} )() );
......
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