Skip to content

Commit

Permalink
Merge pull request #7585 from google/rc/v10.2.2
Browse files Browse the repository at this point in the history
release: v10.2.2
  • Loading branch information
BeksOmega authored Oct 9, 2023
2 parents ead46e7 + 865c593 commit 925a7b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
9 changes: 3 additions & 6 deletions core/field_colour.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,9 @@ export class FieldColour extends Field<string> {

const block = this.getSourceBlock() as BlockSvg | null;
if (!block) throw new UnattachedFieldError();
// In general, do *not* let fields control the color of blocks. Having the
// field control the color is unexpected, and could have performance
// impacts.
// Whenever we render, the field may no longer be a full-block-field so
// we need to update the colour.
if (this.getConstants()!.FIELD_COLOUR_FULL_BLOCK) block.applyColour();
// Calling applyColour updates the UI (full-block vs non-full-block) for the
// colour field, and the colour of the field/block.
block.applyColour();
}

/**
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blockly",
"version": "10.2.1",
"version": "10.2.2",
"description": "Blockly is a library for building visual programming editors.",
"keywords": [
"blockly"
Expand Down

0 comments on commit 925a7b9

Please sign in to comment.