Commit f76a3351 authored by Akikonata's avatar Akikonata

fixed select

parent 692be834
...@@ -29,11 +29,11 @@ KityMinder.registerModule( "Select", function () { ...@@ -29,11 +29,11 @@ KityMinder.registerModule( "Select", function () {
startPosition = g.snapToSharp( e.getPosition() ); startPosition = g.snapToSharp( e.getPosition() );
}, },
selectMove: function ( e ) { selectMove: function ( e ) {
if(minder.isTextEditStatus()){ if ( minder.isTextEditStatus() ) {
return; return;
} }
if ( !startPosition ) return; if ( !startPosition ) return;
var p1 = startPosition, var p1 = startPosition,
p2 = e.getPosition(); p2 = e.getPosition();
...@@ -67,7 +67,7 @@ KityMinder.registerModule( "Select", function () { ...@@ -67,7 +67,7 @@ KityMinder.registerModule( "Select", function () {
// 计算选中范围 // 计算选中范围
minder.getRoot().traverse( function ( node ) { minder.getRoot().traverse( function ( node ) {
var renderBox = node.getRenderContainer().getRenderBox(); var renderBox = node.getRenderContainer().getRenderBox( "top" );
if ( g.isBoxIntersect( renderBox, marquee ) ) { if ( g.isBoxIntersect( renderBox, marquee ) ) {
selectedNodes.push( node ); selectedNodes.push( node );
} }
...@@ -82,7 +82,7 @@ KityMinder.registerModule( "Select", function () { ...@@ -82,7 +82,7 @@ KityMinder.registerModule( "Select", function () {
} }
if ( marqueeMode ) { if ( marqueeMode ) {
marqueeShape.fadeOut( 200, 'ease', 0, function () { marqueeShape.fadeOut( 200, 'ease', 0, function () {
if(marqueeShape.remove) marqueeShape.remove(); if ( marqueeShape.remove ) marqueeShape.remove();
} ); } );
marqueeMode = false; marqueeMode = false;
} }
......
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