@@ -184,10 +184,6 @@ class Stage extends React.Component {
184184 ...this . renderer . extractColor ( x , y , colorPickerRadius )
185185 } ;
186186 }
187- getTargetDrawableIDs ( ) {
188- // Disregard pen, video sensing, and other drawables added by extensions.
189- return this . props . vm . runtime . targets . map ( i => i . drawableID ) ;
190- }
191187 handleDoubleClick ( e ) {
192188 // tw: Disable editing target changing in certain circumstances to avoid lag
193189 if ( this . props . disableEditingTargetChange ) {
@@ -196,13 +192,7 @@ class Stage extends React.Component {
196192 const { x, y} = getEventXY ( e ) ;
197193 // Set editing target from cursor position, if clicking on a sprite.
198194 const mousePosition = [ x - this . rect . left , y - this . rect . top ] ;
199- const drawableId = this . renderer . pick (
200- mousePosition [ 0 ] ,
201- mousePosition [ 1 ] ,
202- 1 ,
203- 1 ,
204- this . getTargetDrawableIDs ( )
205- ) ;
195+ const drawableId = this . renderer . pick ( mousePosition [ 0 ] , mousePosition [ 1 ] ) ;
206196 if ( drawableId === - 1 ) return ;
207197 const targetId = this . props . vm . getTargetIdForDrawableId ( drawableId ) ;
208198 if ( targetId === null ) return ;
@@ -385,13 +375,7 @@ class Stage extends React.Component {
385375 }
386376 onStartDrag ( x , y ) {
387377 if ( this . state . dragId ) return ;
388- const drawableId = this . renderer . pick (
389- x ,
390- y ,
391- 1 ,
392- 1 ,
393- this . getTargetDrawableIDs ( )
394- ) ;
378+ const drawableId = this . renderer . pick ( x , y ) ;
395379 if ( drawableId === - 1 ) return ;
396380 const targetId = this . props . vm . getTargetIdForDrawableId ( drawableId ) ;
397381 if ( targetId === null ) return ;
0 commit comments