Avoid override field color
This commit is contained in:
parent
3d49b62e18
commit
53ee07348f
@ -381,7 +381,7 @@ input.blocklyHtmlInput {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.blocklyFieldRect {
|
||||
.blocklyFieldRect:not(.blocklyColourFieldRect) {
|
||||
fill: #242424 !important;
|
||||
}
|
||||
|
||||
|
||||
@ -844,6 +844,19 @@ Blockly.FieldColour.prototype.setValue = function (colour) {
|
||||
this.doValueUpdate_(colour);
|
||||
}
|
||||
|
||||
Blockly.FieldColour.prototype.initView = function() {
|
||||
this.size_ = new Blockly.utils.Size(
|
||||
this.getConstants().FIELD_COLOUR_DEFAULT_WIDTH,
|
||||
this.getConstants().FIELD_COLOUR_DEFAULT_HEIGHT);
|
||||
if (!this.getConstants().FIELD_COLOUR_FULL_BLOCK) {
|
||||
this.createBorderRect_();
|
||||
this.borderRect_.style['fillOpacity'] = '1';
|
||||
this.borderRect_.classList.add('blocklyColourFieldRect');
|
||||
} else {
|
||||
this.clickTarget_ = this.sourceBlock_.getSvgRoot();
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.FieldTextInput.prototype.showInlineEditor_ = function(quietInput) {
|
||||
Blockly.WidgetDiv.show(
|
||||
this, this.sourceBlock_.RTL, this.widgetDispose_.bind(this));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user