mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
Merge pull request #2996 from rachel-fenichel/alphabetize
Alphabetize requires
This commit is contained in:
@@ -28,6 +28,7 @@ goog.provide('Blockly.blockRendering.ConstantProvider');
|
||||
|
||||
goog.require('Blockly.utils.svgPaths');
|
||||
|
||||
|
||||
/**
|
||||
* An object that provides constants for rendering blocks.
|
||||
* @constructor
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
|
||||
goog.provide('Blockly.blockRendering.Debug');
|
||||
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.blockRendering.BottomRow');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
goog.require('Blockly.blockRendering.Row');
|
||||
goog.require('Blockly.blockRendering.SpacerRow');
|
||||
goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,15 +26,15 @@
|
||||
|
||||
goog.provide('Blockly.blockRendering.Drawer');
|
||||
|
||||
goog.require('Blockly.blockRendering.Debug');
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.blockRendering.BottomRow');
|
||||
goog.require('Blockly.blockRendering.Debug');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
goog.require('Blockly.blockRendering.Row');
|
||||
goog.require('Blockly.blockRendering.SpacerRow');
|
||||
goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.utils.svgPaths');
|
||||
|
||||
|
||||
|
||||
@@ -26,24 +26,22 @@
|
||||
|
||||
goog.provide('Blockly.blockRendering.RenderInfo');
|
||||
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.blockRendering.BottomRow');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.Row');
|
||||
goog.require('Blockly.blockRendering.SpacerRow');
|
||||
goog.require('Blockly.blockRendering.TopRow');
|
||||
|
||||
goog.require('Blockly.blockRendering.InlineInput');
|
||||
goog.require('Blockly.blockRendering.ExternalValueInput');
|
||||
goog.require('Blockly.blockRendering.StatementInput');
|
||||
|
||||
goog.require('Blockly.blockRendering.PreviousConnection');
|
||||
goog.require('Blockly.blockRendering.InlineInput');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.NextConnection');
|
||||
goog.require('Blockly.blockRendering.OutputConnection');
|
||||
|
||||
goog.require('Blockly.blockRendering.PreviousConnection');
|
||||
goog.require('Blockly.blockRendering.Row');
|
||||
goog.require('Blockly.blockRendering.SpacerRow');
|
||||
goog.require('Blockly.blockRendering.StatementInput');
|
||||
goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.RenderedConnection');
|
||||
|
||||
|
||||
/**
|
||||
* An object containing all sizing information needed to draw this block.
|
||||
*
|
||||
|
||||
@@ -31,6 +31,7 @@ goog.require('Blockly.blockRendering.Debug');
|
||||
goog.require('Blockly.blockRendering.Drawer');
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
|
||||
|
||||
/**
|
||||
* The base class for a block renderer.
|
||||
* @package
|
||||
|
||||
@@ -29,6 +29,7 @@ goog.provide('Blockly.geras.HighlightConstantProvider');
|
||||
goog.require('Blockly.blockRendering.ConstantProvider');
|
||||
goog.require('Blockly.utils.svgPaths');
|
||||
|
||||
|
||||
/**
|
||||
* An object that provides constants for rendering highlights on blocks.
|
||||
* Some highlights are simple offsets of the parent paths and can be generated
|
||||
|
||||
@@ -27,14 +27,14 @@
|
||||
|
||||
goog.provide('Blockly.geras.Highlighter');
|
||||
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.blockRendering.BottomRow');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
goog.require('Blockly.blockRendering.Row');
|
||||
goog.require('Blockly.blockRendering.SpacerRow');
|
||||
goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.utils.svgPaths');
|
||||
|
||||
|
||||
|
||||
@@ -28,25 +28,23 @@
|
||||
goog.provide('Blockly.geras');
|
||||
goog.provide('Blockly.geras.RenderInfo');
|
||||
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.blockRendering.BottomRow');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.Row');
|
||||
goog.require('Blockly.blockRendering.SpacerRow');
|
||||
goog.require('Blockly.blockRendering.TopRow');
|
||||
|
||||
goog.require('Blockly.blockRendering.InlineInput');
|
||||
goog.require('Blockly.blockRendering.ExternalValueInput');
|
||||
goog.require('Blockly.blockRendering.StatementInput');
|
||||
|
||||
goog.require('Blockly.blockRendering.PreviousConnection');
|
||||
goog.require('Blockly.blockRendering.InlineInput');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.NextConnection');
|
||||
goog.require('Blockly.blockRendering.OutputConnection');
|
||||
|
||||
goog.require('Blockly.blockRendering.PreviousConnection');
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
goog.require('Blockly.blockRendering.Row');
|
||||
goog.require('Blockly.blockRendering.SpacerRow');
|
||||
goog.require('Blockly.blockRendering.StatementInput');
|
||||
goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.RenderedConnection');
|
||||
|
||||
|
||||
/**
|
||||
* An object containing all sizing information needed to draw this block.
|
||||
*
|
||||
|
||||
@@ -33,6 +33,7 @@ goog.require('Blockly.geras.Drawer');
|
||||
goog.require('Blockly.geras.HighlightConstantProvider');
|
||||
goog.require('Blockly.geras.RenderInfo');
|
||||
|
||||
|
||||
/**
|
||||
* The geras renderer.
|
||||
* @package
|
||||
|
||||
@@ -29,6 +29,7 @@ goog.provide('Blockly.blockRendering.Measurable');
|
||||
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
|
||||
|
||||
/**
|
||||
* The base class to represent a part of a block that takes up space during
|
||||
* rendering. The constructor for each non-spacer Measurable records the size
|
||||
|
||||
@@ -32,6 +32,7 @@ goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.RenderedConnection');
|
||||
|
||||
|
||||
/**
|
||||
* The base class to represent a connection and the space that it takes up on
|
||||
* the block.
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
|
||||
goog.provide('Blockly.blockRendering.InputConnection');
|
||||
goog.provide('Blockly.blockRendering.InlineInput');
|
||||
goog.provide('Blockly.blockRendering.StatementInput');
|
||||
goog.provide('Blockly.blockRendering.ExternalValueInput');
|
||||
goog.provide('Blockly.blockRendering.InlineInput');
|
||||
goog.provide('Blockly.blockRendering.InputConnection');
|
||||
goog.provide('Blockly.blockRendering.StatementInput');
|
||||
|
||||
goog.require('Blockly.blockRendering.Connection');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
/**
|
||||
* @license
|
||||
* Visual Blocks Editor
|
||||
*
|
||||
* Copyright 2019 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Objects representing elements in a row of a rendered
|
||||
* block.
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
|
||||
goog.provide('Blockly.blockRendering.Field');
|
||||
goog.provide('Blockly.blockRendering.Hat');
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview An object representing a single row on a rendered block and all
|
||||
* @fileoverview Objects representing a single row on a rendered block and all
|
||||
* of its subcomponents.
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
@@ -38,6 +38,7 @@ goog.require('Blockly.blockRendering.PreviousConnection');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.RenderedConnection');
|
||||
|
||||
|
||||
/**
|
||||
* An object representing a single row on a rendered block and all of its
|
||||
* subcomponents.
|
||||
|
||||
@@ -28,23 +28,20 @@
|
||||
goog.provide('Blockly.thrasos');
|
||||
goog.provide('Blockly.thrasos.RenderInfo');
|
||||
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.blockRendering.BottomRow');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.Row');
|
||||
goog.require('Blockly.blockRendering.SpacerRow');
|
||||
goog.require('Blockly.blockRendering.TopRow');
|
||||
|
||||
goog.require('Blockly.blockRendering.InlineInput');
|
||||
goog.require('Blockly.blockRendering.ExternalValueInput');
|
||||
goog.require('Blockly.blockRendering.StatementInput');
|
||||
|
||||
goog.require('Blockly.blockRendering.PreviousConnection');
|
||||
goog.require('Blockly.blockRendering.InlineInput');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.NextConnection');
|
||||
goog.require('Blockly.blockRendering.OutputConnection');
|
||||
|
||||
goog.require('Blockly.blockRendering.PreviousConnection');
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
goog.require('Blockly.blockRendering.Row');
|
||||
goog.require('Blockly.blockRendering.SpacerRow');
|
||||
goog.require('Blockly.blockRendering.StatementInput');
|
||||
goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.RenderedConnection');
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,6 +30,7 @@ goog.provide('Blockly.zelos.ConstantProvider');
|
||||
goog.require('Blockly.blockRendering.ConstantProvider');
|
||||
goog.require('Blockly.utils.svgPaths');
|
||||
|
||||
|
||||
/**
|
||||
* An object that provides constants for rendering blocks in Zelos mode.
|
||||
* @constructor
|
||||
@@ -38,7 +39,7 @@ goog.require('Blockly.utils.svgPaths');
|
||||
*/
|
||||
Blockly.zelos.ConstantProvider = function() {
|
||||
Blockly.zelos.ConstantProvider.superClass_.constructor.call(this);
|
||||
|
||||
|
||||
this.GRID_UNIT = 4;
|
||||
|
||||
this.CORNER_RADIUS = 1 * this.GRID_UNIT;
|
||||
|
||||
@@ -201,7 +201,7 @@ Blockly.zelos.Drawer.prototype.drawFlatBottom_ = function() {
|
||||
|
||||
this.outlinePath_ +=
|
||||
Blockly.utils.svgPaths.lineOnAxis('V', bottomRow.baseline);
|
||||
|
||||
|
||||
this.outlinePath_ += Blockly.utils.svgPaths.lineOnAxis('h', -bottomRow.width);
|
||||
};
|
||||
|
||||
|
||||
@@ -28,30 +28,27 @@
|
||||
goog.provide('Blockly.zelos');
|
||||
goog.provide('Blockly.zelos.RenderInfo');
|
||||
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.BottomRow');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.Row');
|
||||
goog.require('Blockly.blockRendering.SpacerRow');
|
||||
goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
|
||||
goog.require('Blockly.blockRendering.InlineInput');
|
||||
goog.require('Blockly.blockRendering.ExternalValueInput');
|
||||
goog.require('Blockly.blockRendering.StatementInput');
|
||||
|
||||
goog.require('Blockly.blockRendering.PreviousConnection');
|
||||
goog.require('Blockly.blockRendering.InlineInput');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.NextConnection');
|
||||
goog.require('Blockly.blockRendering.OutputConnection');
|
||||
|
||||
goog.require('Blockly.blockRendering.PreviousConnection');
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
goog.require('Blockly.blockRendering.Row');
|
||||
goog.require('Blockly.blockRendering.SpacerRow');
|
||||
goog.require('Blockly.blockRendering.StatementInput');
|
||||
goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.RenderedConnection');
|
||||
|
||||
goog.require('Blockly.zelos.AfterStatementSpacerRow');
|
||||
goog.require('Blockly.zelos.BeforeStatementSpacerRow');
|
||||
goog.require('Blockly.zelos.BottomRow');
|
||||
goog.require('Blockly.zelos.TopRow');
|
||||
|
||||
|
||||
/**
|
||||
* An object containing all sizing information needed to draw this block.
|
||||
*
|
||||
@@ -350,7 +347,7 @@ Blockly.zelos.RenderInfo.prototype.finalize_ = function() {
|
||||
var widestRowWithConnectedBlocks = 0;
|
||||
for (var i = 0, row; (row = this.rows[i]); i++) {
|
||||
row.xPos = this.startX;
|
||||
|
||||
|
||||
widestRowWithConnectedBlocks =
|
||||
Math.max(widestRowWithConnectedBlocks, row.widthWithConnectedBlocks);
|
||||
var xCursor = row.xPos;
|
||||
|
||||
@@ -32,6 +32,7 @@ goog.require('Blockly.zelos.ConstantProvider');
|
||||
goog.require('Blockly.zelos.Drawer');
|
||||
goog.require('Blockly.zelos.RenderInfo');
|
||||
|
||||
|
||||
/**
|
||||
* The zelos renderer.
|
||||
* @package
|
||||
|
||||
Reference in New Issue
Block a user