Alphabetize require statements.

Search and replace for userAgent didn’t take into account alphabetic ordering.
Also some line wraping.
This commit is contained in:
Neil Fraser
2019-06-06 18:31:31 -07:00
committed by Neil Fraser
parent 1905531824
commit 3dfac9a2ba
14 changed files with 26 additions and 23 deletions

View File

@@ -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};
};

View File

@@ -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

View File

@@ -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');
/**

View File

@@ -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');

View File

@@ -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');

View File

@@ -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);

View File

@@ -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');

View File

@@ -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');
/**

View File

@@ -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');
/**

View File

@@ -27,8 +27,8 @@
goog.provide('Blockly.Grid');
goog.require('Blockly.utils.userAgent');
goog.require('Blockly.utils');
goog.require('Blockly.utils.userAgent');
/**

View File

@@ -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);
}

View File

@@ -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');

View File

@@ -27,8 +27,8 @@
goog.provide('Blockly.WorkspaceAudio');
goog.require('Blockly.utils.userAgent');
goog.require('Blockly.utils');
goog.require('Blockly.utils.userAgent');
/**

View File

@@ -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_();
}