File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -979,15 +979,15 @@ Blockly.ScratchBlocks.ProcedureUtils.argumentReporterMutationToDom = function()
979979
980980Blockly . ScratchBlocks . ProcedureUtils . argumentReporterDomToMutation = function ( dom ) {
981981 try {
982- this . color = JSON . parse ( dom . getAttribute ( 'color' ) )
983- this . updateDisplay_ ( )
982+ this . color = JSON . parse ( dom . getAttribute ( 'color' ) ) ;
983+ this . updateDisplay_ ( ) ;
984984 } catch ( err ) {
985985 console . warn ( 'unknown old argument reporter' )
986986 }
987987} ;
988988
989989Blockly . ScratchBlocks . ProcedureUtils . argumentReporterUpdateDisplay = function ( dom ) {
990- this . setColour ( ...this . color )
990+ this . setColour ( ...this . color ) ;
991991} ;
992992
993993Blockly . Blocks [ 'procedures_definition' ] = {
@@ -1129,11 +1129,16 @@ Blockly.Blocks['procedures_declaration'] = {
11291129 this . argumentDefaults_ = [ ] ;
11301130 this . warp_ = false ;
11311131 this . output_ = false ;
1132- this . isDisplayOnly = true
1133- this . edited = false
1134- this . outputType = 'statement'
1135- this . image = ''
1136- this . color = [ Blockly . Colours . more . primary , Blockly . Colours . more . secondary , Blockly . Colours . more . tertiary ]
1132+ this . isDisplayOnly = true ;
1133+ this . edited = false ;
1134+ this . outputType = 'statement' ;
1135+ this . image = '' ;
1136+ this . color = [ Blockly . Colours . more . primary , Blockly . Colours . more . secondary , Blockly . Colours . more . tertiary ] ;
1137+
1138+ queueMicrotask ( ( ) => {
1139+ this . setColour ( ...this . color ) ;
1140+ this . parentBlock_ . setColour ( ...this . color ) ; console . log ( this . color ) ;
1141+ } ) ;
11371142 } ,
11381143 // Shared.
11391144 getProcCode : Blockly . ScratchBlocks . ProcedureUtils . getProcCode ,
You can’t perform that action at this time.
0 commit comments