Migrate core/renderers/geras/measurables/input.js to goog.module

This commit is contained in:
kozbial
2021-08-10 14:45:47 -07:00
committed by Monica Kozbial
parent 87568c5869
commit 26d4431ae5
3 changed files with 16 additions and 10 deletions

View File

@@ -11,7 +11,8 @@
*/
'use strict';
goog.provide('Blockly.geras.InlineInput');
goog.module('Blockly.geras.InlineInput');
goog.module.declareLegacyNamespace();
goog.require('Blockly.blockRendering.InlineInput');
goog.require('Blockly.utils.object');
@@ -31,8 +32,8 @@ goog.requireType('Blockly.Input');
* @constructor
* @extends {Blockly.blockRendering.InlineInput}
*/
Blockly.geras.InlineInput = function(constants, input) {
Blockly.geras.InlineInput.superClass_.constructor.call(
const InlineInput = function(constants, input) {
InlineInput.superClass_.constructor.call(
this, constants, input);
if (this.connectedBlock) {
@@ -42,5 +43,7 @@ Blockly.geras.InlineInput = function(constants, input) {
this.height += this.constants_.DARK_PATH_OFFSET;
}
};
Blockly.utils.object.inherits(Blockly.geras.InlineInput,
Blockly.utils.object.inherits(InlineInput,
Blockly.blockRendering.InlineInput);
exports = InlineInput;

View File

@@ -11,7 +11,8 @@
*/
'use strict';
goog.provide('Blockly.geras.StatementInput');
goog.module('Blockly.geras.StatementInput');
goog.module.declareLegacyNamespace();
goog.require('Blockly.blockRendering.StatementInput');
goog.require('Blockly.utils.object');
@@ -31,8 +32,8 @@ goog.requireType('Blockly.Input');
* @constructor
* @extends {Blockly.blockRendering.StatementInput}
*/
Blockly.geras.StatementInput = function(constants, input) {
Blockly.geras.StatementInput.superClass_.constructor.call(
const StatementInput = function(constants, input) {
StatementInput.superClass_.constructor.call(
this, constants, input);
if (this.connectedBlock) {
@@ -41,5 +42,7 @@ Blockly.geras.StatementInput = function(constants, input) {
this.height += this.constants_.DARK_PATH_OFFSET;
}
};
Blockly.utils.object.inherits(Blockly.geras.StatementInput,
Blockly.utils.object.inherits(StatementInput,
Blockly.blockRendering.StatementInput);
exports = StatementInput;

View File

@@ -143,8 +143,8 @@ goog.addDependency('../../core/renderers/geras/drawer.js', ['Blockly.geras.Drawe
goog.addDependency('../../core/renderers/geras/highlight_constants.js', ['Blockly.geras.HighlightConstantProvider'], ['Blockly.utils.svgPaths'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/renderers/geras/highlighter.js', ['Blockly.geras.Highlighter'], ['Blockly.blockRendering.Types', 'Blockly.utils.svgPaths'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/renderers/geras/info.js', ['Blockly.geras.RenderInfo'], ['Blockly.blockRendering.ExternalValueInput', 'Blockly.blockRendering.InRowSpacer', 'Blockly.blockRendering.RenderInfo', 'Blockly.blockRendering.Types', 'Blockly.geras.InlineInput', 'Blockly.geras.StatementInput', 'Blockly.inputTypes', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/renderers/geras/measurables/inline_input.js', ['Blockly.geras.InlineInput'], ['Blockly.blockRendering.InlineInput', 'Blockly.utils.object']);
goog.addDependency('../../core/renderers/geras/measurables/statement_input.js', ['Blockly.geras.StatementInput'], ['Blockly.blockRendering.StatementInput', 'Blockly.utils.object']);
goog.addDependency('../../core/renderers/geras/measurables/inline_input.js', ['Blockly.geras.InlineInput'], ['Blockly.blockRendering.InlineInput', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/renderers/geras/measurables/statement_input.js', ['Blockly.geras.StatementInput'], ['Blockly.blockRendering.StatementInput', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/renderers/geras/path_object.js', ['Blockly.geras.PathObject'], ['Blockly.blockRendering.PathObject', 'Blockly.utils.Svg', 'Blockly.utils.colour', 'Blockly.utils.dom', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/renderers/geras/renderer.js', ['Blockly.geras.Renderer'], ['Blockly.blockRendering', 'Blockly.blockRendering.Renderer', 'Blockly.geras.ConstantProvider', 'Blockly.geras.Drawer', 'Blockly.geras.HighlightConstantProvider', 'Blockly.geras.PathObject', 'Blockly.geras.RenderInfo', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
goog.addDependency('../../core/renderers/measurables/base.js', ['Blockly.blockRendering.Measurable'], ['Blockly.blockRendering.Types'], {'lang': 'es6', 'module': 'goog'});