Skip to content

Commit 63c64f4

Browse files
authored
procedures.js -- fix define coloring (1/2)
1 parent 719ad48 commit 63c64f4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

blocks_vertical/procedures.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,13 @@ Blockly.ScratchBlocks.ProcedureUtils.populateArgumentOnPrototype_ = function(
564564
Blockly.ScratchBlocks.ProcedureUtils.checkOldTypeMatches_(oldBlock, type);
565565
var displayName = this.displayNames_[index];
566566

567-
// Decide which block to attach.
567+
// For update colors
568+
if (oldBlock) {
569+
oldBlock.color = this.color;
570+
oldBlock.setColour(...oldBlock.color);
571+
this.setColour(...this.color);
572+
}
573+
// Decide which block to attach
568574
if (connectionMap && oldBlock && oldTypeMatches) {
569575
// Update the text if needed. The old argument reporter is the same type,
570576
// and on the same input, but the argument's display name may have changed.

0 commit comments

Comments
 (0)