Remove this.text_ (#2910)

* Remove this.text_ and have every field handle its own properties.
This commit is contained in:
Sam El-Husseini
2019-08-26 10:56:36 -07:00
committed by GitHub
parent cd56a0c0b2
commit f23b659898
7 changed files with 199 additions and 137 deletions

View File

@@ -294,13 +294,8 @@ Blockly.FieldAngle.prototype.setAngle = function(angle) {
}
// Update value.
var angleString = String(angle);
if (angleString != this.text_) {
this.htmlInput_.value = angle;
this.setValue(angle);
// Always render the input angle.
this.text_ = angleString;
this.forceRerender();
if (angle != this.value_) {
this.setEditorValue_(angle);
}
};