@@ -104,9 +104,6 @@ class Palettes {
104104 }
105105
106106 _makeSelectorButton ( i ) {
107- // eslint-disable-next-line no-console
108- console . debug ( "makeSelectorButton " + i ) ;
109-
110107 if ( ! document . getElementById ( "palette" ) ) {
111108 const element = document . createElement ( "div" ) ;
112109 element . id = "palette" ;
@@ -134,6 +131,7 @@ class Palettes {
134131 element . childNodes [ 0 ] . style . border = `1px solid ${ platformColor . selectorSelected } ` ;
135132 document . body . appendChild ( element ) ;
136133 }
134+
137135 const tr = docById ( "palette" ) . children [ 0 ] . children [ 0 ] . children [ 0 ] . children [ 0 ] ;
138136 const td = tr . insertCell ( ) ;
139137 td . width = 1.5 * this . cellSize ;
@@ -218,8 +216,6 @@ class Palettes {
218216 }
219217
220218 getPluginMacroExpansion ( blkname , x , y ) {
221- // eslint-disable-next-line no-console
222- console . debug ( this . pluginMacros [ blkname ] ) ;
223219 const obj = this . pluginMacros [ blkname ] ;
224220 if ( obj != null ) {
225221 obj [ 0 ] [ 2 ] = x ;
@@ -638,9 +634,9 @@ class PaletteModel {
638634 }
639635
640636 const protoBlock = this . activity . blocks . protoBlockDict [ blkname ] ;
637+
641638 if ( protoBlock === null ) {
642- // eslint-disable-next-line no-console
643- console . debug ( "Could not find block " + blkname ) ;
639+ return ;
644640 }
645641
646642 let label = "" ;
@@ -1170,8 +1166,6 @@ class Palette {
11701166
11711167 _makeBlockFromPalette ( protoblk , blkname , callback ) {
11721168 if ( protoblk === null ) {
1173- // eslint-disable-next-line no-console
1174- console . debug ( "null protoblk?" ) ;
11751169 return ;
11761170 }
11771171
@@ -1191,10 +1185,7 @@ class Palette {
11911185 break ;
11921186 case "storein2" :
11931187 // Use the name of the box in the label
1194- // eslint-disable-next-line no-console
1195- console . debug (
1196- "storein2" + " " + protoblk . defaults [ 0 ] + " " + protoblk . staticLabels [ 0 ]
1197- ) ;
1188+
11981189 blkname = "store in2 " + protoblk . defaults [ 0 ] ;
11991190 newBlk = protoblk . name ;
12001191 arg = protoblk . staticLabels [ 0 ] ;
@@ -1211,8 +1202,6 @@ class Palette {
12111202 blkname = "namedbox" ;
12121203 arg = _ ( "box" ) ;
12131204 } else {
1214- // eslint-disable-next-line no-console
1215- console . debug ( protoblk . defaults [ 0 ] ) ;
12161205 blkname = protoblk . defaults [ 0 ] ;
12171206 arg = protoblk . defaults [ 0 ] ;
12181207 }
@@ -1348,9 +1337,6 @@ class Palette {
13481337 for ( let blk = 0 ; blk < this . activity . blocks . blockList . length ; blk ++ ) {
13491338 const block = this . activity . blocks . blockList [ blk ] ;
13501339 if ( block . name === "status" && ! block . trash ) {
1351- console . log (
1352- "Status block already exists, preventing creation of another one"
1353- ) ;
13541340 return ;
13551341 }
13561342 }
@@ -1474,7 +1460,6 @@ class Palette {
14741460 for ( let i = 0 ; i < boxBlocks . length ; i ++ ) {
14751461 const boxBlockId = boxBlocks [ i ] ;
14761462 const boxBlock = activity . blocks . blockList [ boxBlockId ] ;
1477- console . log ( "Adding box block to status:" , boxBlock ) ;
14781463
14791464 statusBlocks . push ( [
14801465 lastBlockIndex + 1 ,
@@ -1499,7 +1484,7 @@ class Palette {
14991484 ] ) ;
15001485 lastBlockIndex += 2 ;
15011486 }
1502- console . log ( "blocks" ) ;
1487+
15031488 macroExpansion = statusBlocks ;
15041489
15051490 // Initialize the status matrix
@@ -1637,8 +1622,7 @@ const initPalettes = async palettes => {
16371622
16381623 palettes . init_selectors ( ) ;
16391624 palettes . makePalettes ( 0 ) ;
1640- // eslint-disable-next-line no-console
1641- console . debug ( "Time to show the palettes." ) ;
1625+
16421626 palettes . show ( ) ;
16431627} ;
16441628
0 commit comments