From 3dfac9a2ba67361f8fa590138d28c51cc3b46b40 Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Thu, 6 Jun 2019 18:31:31 -0700 Subject: [PATCH] Alphabetize require statements. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Search and replace for userAgent didn’t take into account alphabetic ordering. Also some line wraping. --- core/block_svg.js | 8 ++++---- core/bubble.js | 6 +++--- core/comment.js | 2 +- core/contextmenu.js | 2 +- core/field.js | 2 +- core/field_angle.js | 5 +++-- core/field_dropdown.js | 2 +- core/field_textinput.js | 2 +- core/flyout_vertical.js | 2 +- core/grid.js | 2 +- core/inject.js | 7 ++++--- core/utils.js | 4 ++-- core/workspace_audio.js | 2 +- core/workspace_svg.js | 3 ++- 14 files changed, 26 insertions(+), 23 deletions(-) diff --git a/core/block_svg.js b/core/block_svg.js index 76d46e53f..f441486db 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -480,8 +480,8 @@ Blockly.BlockSvg.prototype.getBoundingRectangle = function() { var bottomRight; if (this.RTL) { // Width has the tab built into it already so subtract it here. - topLeft = new Blockly.utils.Coordinate(blockXY.x - (blockBounds.width - tab), - blockXY.y); + topLeft = new Blockly.utils.Coordinate( + blockXY.x - (blockBounds.width - tab), blockXY.y); // Add the width of the tab/puzzle piece knob to the x coordinate // since X is the corner of the rectangle, not the whole puzzle piece. bottomRight = new Blockly.utils.Coordinate(blockXY.x + tab, @@ -491,8 +491,8 @@ Blockly.BlockSvg.prototype.getBoundingRectangle = function() { // since X is the corner of the rectangle, not the whole puzzle piece. topLeft = new Blockly.utils.Coordinate(blockXY.x - tab, blockXY.y); // Width has the tab built into it already so subtract it here. - bottomRight = new Blockly.utils.Coordinate(blockXY.x + blockBounds.width - tab, - blockXY.y + blockBounds.height); + bottomRight = new Blockly.utils.Coordinate( + blockXY.x + blockBounds.width - tab, blockXY.y + blockBounds.height); } return {topLeft: topLeft, bottomRight: bottomRight}; }; diff --git a/core/bubble.js b/core/bubble.js index 122a6dcca..b4e67800a 100644 --- a/core/bubble.js +++ b/core/bubble.js @@ -28,10 +28,10 @@ goog.provide('Blockly.Bubble'); goog.require('Blockly.utils.Coordinate'); goog.require('Blockly.Touch'); -goog.require('Blockly.utils.userAgent'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); goog.require('Blockly.utils.math'); +goog.require('Blockly.utils.userAgent'); goog.require('Blockly.Workspace'); @@ -41,8 +41,8 @@ goog.require('Blockly.Workspace'); * bubble. * @param {!Element} content SVG content for the bubble. * @param {Element} shape SVG element to avoid eclipsing. - * @param {!Blockly.utils.Coordinate} anchorXY Absolute position of bubble's anchor - * point. + * @param {!Blockly.utils.Coordinate} anchorXY Absolute position of bubble's + * anchor point. * @param {?number} bubbleWidth Width of bubble, or null if not resizable. * @param {?number} bubbleHeight Height of bubble, or null if not resizable. * @constructor diff --git a/core/comment.js b/core/comment.js index aa4eef758..e60accff9 100644 --- a/core/comment.js +++ b/core/comment.js @@ -31,8 +31,8 @@ goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockChange'); goog.require('Blockly.Events.Ui'); goog.require('Blockly.Icon'); -goog.require('Blockly.utils.userAgent'); goog.require('Blockly.utils'); +goog.require('Blockly.utils.userAgent'); /** diff --git a/core/contextmenu.js b/core/contextmenu.js index 736bd17cc..838fa03a2 100644 --- a/core/contextmenu.js +++ b/core/contextmenu.js @@ -34,10 +34,10 @@ goog.require('Blockly.utils.Coordinate'); goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockCreate'); goog.require('Blockly.Msg'); -goog.require('Blockly.utils.userAgent'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); goog.require('Blockly.utils.uiMenu'); +goog.require('Blockly.utils.userAgent'); goog.require('Blockly.Xml'); goog.require('goog.events'); diff --git a/core/field.js b/core/field.js index 73a80c9c1..fd5cb26d3 100644 --- a/core/field.js +++ b/core/field.js @@ -31,9 +31,9 @@ goog.provide('Blockly.Field'); goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockChange'); goog.require('Blockly.Gesture'); -goog.require('Blockly.utils.userAgent'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); +goog.require('Blockly.utils.userAgent'); goog.require('goog.math.Size'); goog.require('goog.style'); diff --git a/core/field_angle.js b/core/field_angle.js index 99bfe3d55..da195df42 100644 --- a/core/field_angle.js +++ b/core/field_angle.js @@ -28,9 +28,9 @@ goog.provide('Blockly.FieldAngle'); goog.require('Blockly.DropDownDiv'); goog.require('Blockly.FieldTextInput'); -goog.require('Blockly.utils.userAgent'); goog.require('Blockly.utils'); goog.require('Blockly.utils.math'); +goog.require('Blockly.utils.userAgent'); /** @@ -211,7 +211,8 @@ Blockly.FieldAngle.prototype.showEditor_ = function() { } var border = this.sourceBlock_.getColourBorder(); - border = border.colourBorder == null ? border.colourLight : border.colourBorder; + border = (border.colourBorder == null) ? + border.colourLight : border.colourBorder; Blockly.DropDownDiv.setColour(this.sourceBlock_.getColour(), border); Blockly.DropDownDiv.showPositionedByField(this); diff --git a/core/field_dropdown.js b/core/field_dropdown.js index 1092b905b..c9faa1dba 100644 --- a/core/field_dropdown.js +++ b/core/field_dropdown.js @@ -31,11 +31,11 @@ goog.provide('Blockly.FieldDropdown'); goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockChange'); goog.require('Blockly.Field'); -goog.require('Blockly.utils.userAgent'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); goog.require('Blockly.utils.string'); goog.require('Blockly.utils.uiMenu'); +goog.require('Blockly.utils.userAgent'); goog.require('goog.events'); goog.require('goog.ui.Menu'); diff --git a/core/field_textinput.js b/core/field_textinput.js index b54433482..cb659788d 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -32,9 +32,9 @@ goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockChange'); goog.require('Blockly.Field'); goog.require('Blockly.Msg'); -goog.require('Blockly.utils.userAgent'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); +goog.require('Blockly.utils.userAgent'); /** diff --git a/core/flyout_vertical.js b/core/flyout_vertical.js index f1dcdcda2..c892e314e 100644 --- a/core/flyout_vertical.js +++ b/core/flyout_vertical.js @@ -29,9 +29,9 @@ goog.provide('Blockly.VerticalFlyout'); goog.require('Blockly.Block'); goog.require('Blockly.Flyout'); goog.require('Blockly.FlyoutButton'); -goog.require('Blockly.utils.userAgent'); goog.require('Blockly.utils'); goog.require('Blockly.utils.Rect'); +goog.require('Blockly.utils.userAgent'); /** diff --git a/core/grid.js b/core/grid.js index add42b6e7..2f727751d 100644 --- a/core/grid.js +++ b/core/grid.js @@ -27,8 +27,8 @@ goog.provide('Blockly.Grid'); -goog.require('Blockly.utils.userAgent'); goog.require('Blockly.utils'); +goog.require('Blockly.utils.userAgent'); /** diff --git a/core/inject.js b/core/inject.js index e361173a0..8ad0de9d0 100644 --- a/core/inject.js +++ b/core/inject.js @@ -33,11 +33,11 @@ goog.require('Blockly.Events'); goog.require('Blockly.Grid'); goog.require('Blockly.Options'); goog.require('Blockly.Tooltip'); -goog.require('Blockly.utils.userAgent'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); -goog.require('Blockly.WorkspaceSvg'); +goog.require('Blockly.utils.userAgent'); goog.require('Blockly.WorkspaceDragSurfaceSvg'); +goog.require('Blockly.WorkspaceSvg'); goog.require('goog.ui.Component'); @@ -314,7 +314,8 @@ Blockly.createMainWorkspace_ = function(svg, options, blockDragSurface, } // Bump any object that's below the bottom back inside. - var overflowBottom = metrics.viewBottom - objectMetrics.bottomRight.y; + var overflowBottom = + metrics.viewBottom - objectMetrics.bottomRight.y; if (overflowBottom < 0) { object.moveBy(0, overflowBottom); } diff --git a/core/utils.js b/core/utils.js index b270afa9e..f2c3f18da 100644 --- a/core/utils.js +++ b/core/utils.js @@ -32,10 +32,10 @@ */ goog.provide('Blockly.utils'); -goog.require('Blockly.utils.Coordinate'); goog.require('Blockly.Msg'); -goog.require('Blockly.utils.userAgent'); +goog.require('Blockly.utils.Coordinate'); goog.require('Blockly.utils.string'); +goog.require('Blockly.utils.userAgent'); goog.require('goog.style'); diff --git a/core/workspace_audio.js b/core/workspace_audio.js index ca1d50b9e..8e7029f4b 100644 --- a/core/workspace_audio.js +++ b/core/workspace_audio.js @@ -27,8 +27,8 @@ goog.provide('Blockly.WorkspaceAudio'); -goog.require('Blockly.utils.userAgent'); goog.require('Blockly.utils'); +goog.require('Blockly.utils.userAgent'); /** diff --git a/core/workspace_svg.js b/core/workspace_svg.js index edb7ca61c..6c95a623d 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -774,7 +774,8 @@ Blockly.WorkspaceSvg.prototype.updateScreenCalculationsIfScrolled = function() { /* eslint-disable indent */ var currScroll = Blockly.utils.getDocumentScroll(); - if (!Blockly.utils.Coordinate.equals(this.lastRecordedPageScroll_, currScroll)) { + if (!Blockly.utils.Coordinate.equals( + this.lastRecordedPageScroll_, currScroll)) { this.lastRecordedPageScroll_ = currScroll; this.updateScreenCalculations_(); }