mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Switch from destructuring to normal imports in core/field_checkbox.js
This commit is contained in:
@@ -14,9 +14,9 @@ goog.module('Blockly.FieldCheckbox');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
const Field = goog.require('Blockly.Field');
|
||||
const {addClass} = goog.require('Blockly.utils.dom');
|
||||
const dom = goog.require('Blockly.utils.dom');
|
||||
const fieldRegistry = goog.require('Blockly.fieldRegistry');
|
||||
const {inherits} = goog.require('Blockly.utils.object');
|
||||
const {register} = goog.require('Blockly.fieldRegistry');
|
||||
/** @suppress {extraRequire} */
|
||||
goog.require('Blockly.Events.BlockChange');
|
||||
|
||||
@@ -109,7 +109,7 @@ FieldCheckbox.prototype.configure_ = function(config) {
|
||||
FieldCheckbox.prototype.initView = function() {
|
||||
FieldCheckbox.superClass_.initView.call(this);
|
||||
|
||||
addClass(
|
||||
dom.addClass(
|
||||
/** @type {!SVGTextElement} **/ (this.textElement_), 'blocklyCheckbox');
|
||||
this.textElement_.style.display = this.value_ ? 'block' : 'none';
|
||||
};
|
||||
@@ -221,6 +221,6 @@ FieldCheckbox.prototype.convertValueToBool_ = function(value) {
|
||||
}
|
||||
};
|
||||
|
||||
register('field_checkbox', FieldCheckbox);
|
||||
fieldRegistry.register('field_checkbox', FieldCheckbox);
|
||||
|
||||
exports = FieldCheckbox;
|
||||
|
||||
Reference in New Issue
Block a user