File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -322,10 +322,9 @@ var Tool = this.Tool = PaperScopeItem.extend(/** @lends Tool# */{
322322 return true ;
323323 } ,
324324
325- _onHandleEvent : function ( type , point , event ) {
326- // Update global reference to this scope.
327- paper = this . _scope ;
328- // Handle removeOn* calls first
325+ fire : function ( type , event ) {
326+ // Override Callback#fire() so we can handle items marked in removeOn*()
327+ // calls first,.
329328 var sets = Tool . _removeSets ;
330329 if ( sets ) {
331330 // Always clear the drag set on mouseup
@@ -339,14 +338,20 @@ var Tool = this.Tool = PaperScopeItem.extend(/** @lends Tool# */{
339338 // other sets.
340339 for ( var key in sets ) {
341340 var other = sets [ key ] ;
342- if ( other && other != set && other [ item . _id ] )
341+ if ( other && other != set )
343342 delete other [ item . _id ] ;
344343 }
345344 item . remove ( ) ;
346345 }
347346 sets [ type ] = null ;
348347 }
349348 }
349+ return this . base ( type , event ) ;
350+ } ,
351+
352+ _onHandleEvent : function ( type , point , event ) {
353+ // Update global reference to this scope.
354+ paper = this . _scope ;
350355 // Now handle event callbacks
351356 var called = false ;
352357 switch ( type ) {
You can’t perform that action at this time.
0 commit comments