mirror of
https://github.com/google/blockly.git
synced 2026-01-04 23:50:12 +01:00
Fix broken field demos (#3625)
This commit is contained in:
@@ -88,9 +88,8 @@ CustomFields.FieldPitch.prototype.showEditor_ = function() {
|
||||
var editor = this.dropdownCreate_();
|
||||
Blockly.DropDownDiv.getContentDiv().appendChild(editor);
|
||||
|
||||
var border = this.sourceBlock_.getColourBorder();
|
||||
border = border.colourBorder || border.colourLight;
|
||||
Blockly.DropDownDiv.setColour(this.sourceBlock_.getColour(), border);
|
||||
Blockly.DropDownDiv.setColour(this.sourceBlock_.style.colourPrimary,
|
||||
this.sourceBlock_.style.colourTertiary);
|
||||
|
||||
Blockly.DropDownDiv.showPositionedByField(
|
||||
this, this.dropdownDispose_.bind(this));
|
||||
|
||||
@@ -337,10 +337,8 @@ CustomFields.FieldTurtle.prototype.showEditor_ = function() {
|
||||
|
||||
// These allow us to have the editor match the block's colour.
|
||||
var fillColour = this.sourceBlock_.getColour();
|
||||
// This is technically a package function, meaning it could change.
|
||||
var borderColours = this.sourceBlock_.getColourBorder();
|
||||
var borderColour = borderColours.colourBorder || borderColours.colourDark;
|
||||
Blockly.DropDownDiv.setColour(fillColour, borderColour);
|
||||
Blockly.DropDownDiv.setColour(fillColour,
|
||||
this.sourceBlock_.style.colourTertiary);
|
||||
|
||||
// Always pass the dropdown div a dispose function so that you can clean
|
||||
// up event listeners when the editor closes.
|
||||
@@ -483,9 +481,8 @@ CustomFields.FieldTurtle.prototype.updateColour = function() {
|
||||
var fillColour = isShadow ?
|
||||
this.sourceBlock_.getColourShadow() : this.sourceBlock_.getColour();
|
||||
// This is technically a package function, meaning it could change.
|
||||
var borderColours = this.sourceBlock_.getColourBorder();
|
||||
var borderColour = isShadow ? fillColour :
|
||||
borderColours.colourBorder || borderColours.colourDark;
|
||||
this.sourceBlock_.style.colourTertiary;
|
||||
|
||||
var child = this.turtleGroup_.firstChild;
|
||||
while(child) {
|
||||
|
||||
Reference in New Issue
Block a user