File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2894,6 +2894,22 @@ class Block {
28942894 that . blocks . triggerLongPress ( ) ;
28952895 } , LONGPRESSTIME ) ;
28962896
2897+ //hide the trash when block is being collapse or expand
2898+ const hasColExpBtns =
2899+ this . collapseButtonBitmap && this . expandButtonBitmap ;
2900+
2901+ if ( hasColExpBtns ) {
2902+ const localPoint = this . container . globalToLocal ( event . stageX , event . stageY ) ;
2903+ const isColExpClick =
2904+ this . collapseButtonBitmap . getBounds ( ) . contains ( localPoint . x , localPoint . y ) ||
2905+ this . expandButtonBitmap . getBounds ( ) . contains ( localPoint . x , localPoint . y ) ;
2906+
2907+ if ( isColExpClick ) {
2908+ that . activity . trashcan . hide ( ) ;
2909+ return ;
2910+ }
2911+ }
2912+
28972913 // Always show the trash when there is a block selected,
28982914 that . activity . trashcan . show ( ) ;
28992915
You can’t perform that action at this time.
0 commit comments