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