Fix dropdown field alignment in zelos when baseline is not centered (IE / Edge) (#3534)

This commit is contained in:
Sam El-Husseini
2020-01-02 14:36:06 -08:00
committed by GitHub
parent 5651ed31b8
commit 06c714d13b

View File

@@ -635,7 +635,9 @@ Blockly.FieldDropdown.prototype.renderSelectedText_ = function() {
this.textElement_.setAttribute('y', halfHeight);
if (!this.constants_.FIELD_TEXT_BASELINE_CENTER) {
this.textElement_.setAttribute('dy',
this.constants_.FIELD_TEXT_BASELINE_Y - halfHeight);
this.constants_.FIELD_TEXT_BASELINE_Y -
this.constants_.FIELD_TEXT_HEIGHT / 2 +
this.constants_.FIELD_TEXT_Y_OFFSET);
}
};