Skip to content

Commit 1dbf3bd

Browse files
authored
handle text color in Field.js
1 parent 4bfafde commit 1dbf3bd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/field.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,14 @@ Blockly.Field.prototype.updateTextNode_ = function() {
701701
var textNode = document.createTextNode(text);
702702
this.textElement_.appendChild(textNode);
703703

704+
if (this.textColour) {
705+
this.textElement_.style.setProperty(
706+
"fill",
707+
this.textColour,
708+
"important"
709+
);
710+
}
711+
704712
// Cached width is obsolete. Clear it.
705713
this.size_.width = 0;
706714
};

0 commit comments

Comments
 (0)