Commit 40b114a2 authored by Akikonata's avatar Akikonata

fixed the bug of selecting nodes

parent 290f1339
...@@ -48,13 +48,17 @@ KityMinder.registerModule( "MouseModule", function () { ...@@ -48,13 +48,17 @@ KityMinder.registerModule( "MouseModule", function () {
var _buffer = [ minder.getRoot() ]; var _buffer = [ minder.getRoot() ];
while ( _buffer.length !== 0 ) { while ( _buffer.length !== 0 ) {
_buffer = _buffer.concat( _buffer[ 0 ].getChildren() ); _buffer = _buffer.concat( _buffer[ 0 ].getChildren() );
var _buffer0Shape = _buffer[ 0 ].getRenderContainer().getRenderBox(); var _bufferPoint = _buffer[ 0 ].getRenderContainer().getRenderBox().closurePoints;
var _bufferPoint = { var sel = false;
x: _buffer0Shape.x, for ( var i = 0; i < _bufferPoint.length; i++ ) {
y: _buffer0Shape.y if ( inArea( startPos, p, _bufferPoint[ i ] ) ) {
}; minder.select( _buffer[ 0 ] );
if ( inArea( startPos, p, _bufferPoint ) ) { sel = true;
minder.addSelect( _buffer[ 0 ] ); break;
}
}
if ( !sel ) {
minder.removeSelectedNodes( _buffer[ 0 ] );
} }
_buffer.shift(); _buffer.shift();
} }
......
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