mirror of
https://github.com/google/blockly.git
synced 2026-01-11 19:07:08 +01:00
Migrate core/renderers/measurables/connections.js to goog.module
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
|
||||
goog.provide('Blockly.blockRendering.Connection');
|
||||
goog.module('Blockly.blockRendering.Connection');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
@@ -31,13 +32,15 @@ goog.requireType('Blockly.RenderedConnection');
|
||||
* @constructor
|
||||
* @extends {Blockly.blockRendering.Measurable}
|
||||
*/
|
||||
Blockly.blockRendering.Connection = function(constants, connectionModel) {
|
||||
Blockly.blockRendering.Connection.superClass_.constructor.call(this,
|
||||
const Connection = function(constants, connectionModel) {
|
||||
Connection.superClass_.constructor.call(this,
|
||||
constants);
|
||||
this.connectionModel = connectionModel;
|
||||
this.shape = this.constants_.shapeFor(connectionModel);
|
||||
this.isDynamicShape = !!this.shape['isDynamic'];
|
||||
this.type |= Blockly.blockRendering.Types.CONNECTION;
|
||||
};
|
||||
Blockly.utils.object.inherits(Blockly.blockRendering.Connection,
|
||||
Blockly.utils.object.inherits(Connection,
|
||||
Blockly.blockRendering.Measurable);
|
||||
|
||||
exports = Connection;
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
|
||||
goog.provide('Blockly.blockRendering.NextConnection');
|
||||
goog.module('Blockly.blockRendering.NextConnection');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
goog.require('Blockly.blockRendering.Connection');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
@@ -31,12 +32,14 @@ goog.requireType('Blockly.RenderedConnection');
|
||||
* @constructor
|
||||
* @extends {Blockly.blockRendering.Connection}
|
||||
*/
|
||||
Blockly.blockRendering.NextConnection = function(constants, connectionModel) {
|
||||
Blockly.blockRendering.NextConnection.superClass_.constructor.call(this,
|
||||
const NextConnection = function(constants, connectionModel) {
|
||||
NextConnection.superClass_.constructor.call(this,
|
||||
constants, connectionModel);
|
||||
this.type |= Blockly.blockRendering.Types.NEXT_CONNECTION;
|
||||
this.height = this.shape.height;
|
||||
this.width = this.shape.width;
|
||||
};
|
||||
Blockly.utils.object.inherits(Blockly.blockRendering.NextConnection,
|
||||
Blockly.utils.object.inherits(NextConnection,
|
||||
Blockly.blockRendering.Connection);
|
||||
|
||||
exports = NextConnection;
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
|
||||
goog.provide('Blockly.blockRendering.OutputConnection');
|
||||
goog.module('Blockly.blockRendering.OutputConnection');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
goog.require('Blockly.blockRendering.Connection');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
@@ -32,8 +33,8 @@ goog.requireType('Blockly.RenderedConnection');
|
||||
* @constructor
|
||||
* @extends {Blockly.blockRendering.Connection}
|
||||
*/
|
||||
Blockly.blockRendering.OutputConnection = function(constants, connectionModel) {
|
||||
Blockly.blockRendering.OutputConnection.superClass_.constructor.call(this,
|
||||
const OutputConnection = function(constants, connectionModel) {
|
||||
OutputConnection.superClass_.constructor.call(this,
|
||||
constants, connectionModel);
|
||||
this.type |= Blockly.blockRendering.Types.OUTPUT_CONNECTION;
|
||||
|
||||
@@ -44,5 +45,7 @@ Blockly.blockRendering.OutputConnection = function(constants, connectionModel) {
|
||||
this.connectionOffsetY = this.constants_.TAB_OFFSET_FROM_TOP;
|
||||
this.connectionOffsetX = 0;
|
||||
};
|
||||
Blockly.utils.object.inherits(Blockly.blockRendering.OutputConnection,
|
||||
Blockly.utils.object.inherits(OutputConnection,
|
||||
Blockly.blockRendering.Connection);
|
||||
|
||||
exports = OutputConnection;
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
|
||||
goog.provide('Blockly.blockRendering.PreviousConnection');
|
||||
goog.module('Blockly.blockRendering.PreviousConnection');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
goog.require('Blockly.blockRendering.Connection');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
@@ -31,14 +32,16 @@ goog.requireType('Blockly.RenderedConnection');
|
||||
* @constructor
|
||||
* @extends {Blockly.blockRendering.Connection}
|
||||
*/
|
||||
Blockly.blockRendering.PreviousConnection = function(
|
||||
const PreviousConnection = function(
|
||||
constants, connectionModel) {
|
||||
Blockly.blockRendering.PreviousConnection.superClass_.constructor.call(this,
|
||||
PreviousConnection.superClass_.constructor.call(this,
|
||||
constants, connectionModel);
|
||||
this.type |= Blockly.blockRendering.Types.PREVIOUS_CONNECTION;
|
||||
this.height = this.shape.height;
|
||||
this.width = this.shape.width;
|
||||
|
||||
};
|
||||
Blockly.utils.object.inherits(Blockly.blockRendering.PreviousConnection,
|
||||
Blockly.utils.object.inherits(PreviousConnection,
|
||||
Blockly.blockRendering.Connection);
|
||||
|
||||
exports = PreviousConnection;
|
||||
|
||||
@@ -150,7 +150,7 @@ goog.addDependency('../../core/renderers/geras/path_object.js', ['Blockly.geras.
|
||||
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'});
|
||||
goog.addDependency('../../core/renderers/measurables/bottom_row.js', ['Blockly.blockRendering.BottomRow'], ['Blockly.blockRendering.Row', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/renderers/measurables/connection.js', ['Blockly.blockRendering.Connection'], ['Blockly.blockRendering.Measurable', 'Blockly.blockRendering.Types', 'Blockly.utils.object']);
|
||||
goog.addDependency('../../core/renderers/measurables/connection.js', ['Blockly.blockRendering.Connection'], ['Blockly.blockRendering.Measurable', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/renderers/measurables/external_value_input.js', ['Blockly.blockRendering.ExternalValueInput'], ['Blockly.blockRendering.InputConnection', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/renderers/measurables/field.js', ['Blockly.blockRendering.Field'], ['Blockly.blockRendering.Measurable', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/renderers/measurables/hat.js', ['Blockly.blockRendering.Hat'], ['Blockly.blockRendering.Measurable', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
@@ -160,9 +160,9 @@ goog.addDependency('../../core/renderers/measurables/inline_input.js', ['Blockly
|
||||
goog.addDependency('../../core/renderers/measurables/input_connection.js', ['Blockly.blockRendering.InputConnection'], ['Blockly.blockRendering.Connection', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/renderers/measurables/input_row.js', ['Blockly.blockRendering.InputRow'], ['Blockly.blockRendering.Row', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/renderers/measurables/jagged_edge.js', ['Blockly.blockRendering.JaggedEdge'], ['Blockly.blockRendering.Measurable', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/renderers/measurables/next_connection.js', ['Blockly.blockRendering.NextConnection'], ['Blockly.blockRendering.Connection', 'Blockly.blockRendering.Types', 'Blockly.utils.object']);
|
||||
goog.addDependency('../../core/renderers/measurables/output_connection.js', ['Blockly.blockRendering.OutputConnection'], ['Blockly.blockRendering.Connection', 'Blockly.blockRendering.Types', 'Blockly.utils.object']);
|
||||
goog.addDependency('../../core/renderers/measurables/previous_connection.js', ['Blockly.blockRendering.PreviousConnection'], ['Blockly.blockRendering.Connection', 'Blockly.blockRendering.Types', 'Blockly.utils.object']);
|
||||
goog.addDependency('../../core/renderers/measurables/next_connection.js', ['Blockly.blockRendering.NextConnection'], ['Blockly.blockRendering.Connection', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/renderers/measurables/output_connection.js', ['Blockly.blockRendering.OutputConnection'], ['Blockly.blockRendering.Connection', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/renderers/measurables/previous_connection.js', ['Blockly.blockRendering.PreviousConnection'], ['Blockly.blockRendering.Connection', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/renderers/measurables/round_corner.js', ['Blockly.blockRendering.RoundCorner'], ['Blockly.blockRendering.Measurable', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/renderers/measurables/row.js', ['Blockly.blockRendering.Row'], ['Blockly.blockRendering.Types'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/renderers/measurables/spacer_row.js', ['Blockly.blockRendering.SpacerRow'], ['Blockly.blockRendering.InRowSpacer', 'Blockly.blockRendering.Row', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
|
||||
Reference in New Issue
Block a user