mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Fix angleValidator
reference and lint @this (#515)
This commit is contained in:
parent
e25456edb4
commit
eb1ddddbb0
1 changed files with 1 additions and 2 deletions
|
@ -212,7 +212,7 @@ Blockly.FieldAngle.prototype.onMouseMove = function(e) {
|
|||
angle = Math.round(angle / Blockly.FieldAngle.ROUND) *
|
||||
Blockly.FieldAngle.ROUND;
|
||||
}
|
||||
angle = Blockly.FieldAngle.angleValidator(angle);
|
||||
angle = Blockly.FieldAngle.classValidator(angle);
|
||||
Blockly.FieldTextInput.htmlInput_.value = angle;
|
||||
this.setValue(angle);
|
||||
this.validate_();
|
||||
|
@ -281,7 +281,6 @@ Blockly.FieldAngle.prototype.updateGraph_ = function() {
|
|||
* Ensure that only an angle may be entered.
|
||||
* @param {string} text The user's text.
|
||||
* @return {?string} A string representing a valid angle, or null if invalid.
|
||||
* @this {!Blockly.FieldAngle}
|
||||
*/
|
||||
Blockly.FieldAngle.classValidator = function(text) {
|
||||
if (text === null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue