@@ -495,7 +495,7 @@ class Activity {
495495 ( event ) => {
496496 event . preventDefault ( ) ;
497497 event . stopPropagation ( ) ;
498- if ( ! this . beginnerMode && ! this . isSelecting ) {
498+ if ( ! this . beginnerMode ) {
499499 if ( event . target . id === "myCanvas" ) {
500500 this . _displayHelpfulWheel ( event ) ;
501501 }
@@ -5719,6 +5719,9 @@ class Activity {
57195719
57205720 if ( ! this . helpfulWheelItems . find ( ele => ele . label === "Grid" ) )
57215721 this . helpfulWheelItems . push ( { label : "Grid" , icon : "imgsrc:data:image/svg+xml;base64," + window . btoa ( base64Encode ( CARTESIANBUTTON ) ) , display : true , fn : piemenuGrid } ) ;
5722+
5723+ if ( ! this . helpfulWheelItems . find ( ele => ele . label === "Select" ) )
5724+ this . helpfulWheelItems . push ( { label : "Select" , icon : "imgsrc:data:image/svg+xml;base64," + window . btoa ( base64Encode ( SELECTBUTTON ) ) , display : true , fn : this . selectMode } ) ;
57225725
57235726 if ( ! this . helpfulWheelItems . find ( ele => ele . label === "Clean" ) )
57245727 this . helpfulWheelItems . push ( { label : "Clean" , icon : "imgsrc:data:image/svg+xml;base64," + window . btoa ( base64Encode ( CLEARBUTTON ) ) , display : true , fn : ( ) => this . _allClear ( false ) } ) ;
@@ -6065,7 +6068,7 @@ class Activity {
60656068 document . addEventListener (
60666069 "mousedown" ,
60676070 ( event ) => {
6068- if ( event . button !== 2 ) return ;
6071+ if ( ! this . isSelecting ) return ;
60696072 this . moving = false ;
60706073 // event.preventDefault();
60716074 // event.stopPropagation();
@@ -6087,6 +6090,11 @@ class Activity {
60876090 // end the drag on navbar
60886091 document . getElementById ( "toolbars" ) . addEventListener ( "mouseover" , ( ) => { this . isDragging = false ; } ) ;
60896092
6093+ this . selectMode = ( ) => {
6094+ this . isSelecting = ! this . isSelecting ; ;
6095+ if ( this . moving ) this . moving = false ;
6096+ }
6097+
60906098 this . _create2Ddrag = ( ) => {
60916099 this . dragArea = { } ;
60926100 this . selectedBlocks = [ ] ;
@@ -6119,8 +6127,7 @@ class Activity {
61196127
61206128 document . addEventListener ( "mouseup" , ( event ) => {
61216129 // event.preventDefault();
6122- if ( event . button !== 2 ) return ;
6123- this . moving = true ;
6130+ if ( ! this . isSelecting ) return ;
61246131 this . isDragging = false ;
61256132 this . selectionArea . style . display = "none" ;
61266133 this . startX = 0 ;
0 commit comments