Fix require statements.

Also throw error instead of string.
And stop using goog.asserts.
This commit is contained in:
Neil Fraser
2019-05-15 15:41:48 -07:00
committed by Neil Fraser
parent 49954e0cec
commit 25bc3e0268
7 changed files with 13 additions and 11 deletions

View File

@@ -29,8 +29,6 @@ goog.provide('Blockly.DraggedConnectionManager');
goog.require('Blockly.BlockAnimations');
goog.require('Blockly.RenderedConnection');
goog.require('goog.math.Coordinate');
/**
* Class that controls updates to connections during drags. It is primarily

View File

@@ -29,7 +29,7 @@ goog.provide('Blockly.FieldColour');
goog.require('Blockly.DropDownDiv');
goog.require('Blockly.Field');
goog.require('goog.style');
goog.require('goog.math.Size');
/**

View File

@@ -37,7 +37,7 @@ goog.require('Blockly.utils');
goog.require('Blockly.WorkspaceSvg');
goog.require('Blockly.Xml');
goog.require('goog.math.Rect');
goog.require('goog.math.Coordinate');
/**

View File

@@ -30,8 +30,6 @@ goog.require('Blockly.BlockAnimations');
goog.require('Blockly.Events.BlockMove');
goog.require('Blockly.RenderedConnection');
goog.require('goog.math.Coordinate');
/**
* Class that controls updates to connections during drags. It is primarily
@@ -660,7 +658,8 @@ Blockly.InsertionMarkerManager.prototype.disconnectMarker_ = function() {
}
if (imConn.targetConnection) {
throw 'markerConnection_ still connected at the end of disconnectInsertionMarker';
throw Error('markerConnection_ still connected at the end of ' +
'disconnectInsertionMarker');
}
this.markerConnection_ = null;
@@ -679,8 +678,10 @@ Blockly.InsertionMarkerManager.prototype.connectMarker_ = function() {
var imBlock = isLastInStack ? this.lastMarker_ : this.firstMarker_;
var imConn = imBlock.getMatchingConnection(local.sourceBlock_, local);
goog.asserts.assert(imConn != this.markerConnection_,
'Made it to connectMarker_ even though the marker isn\'t changing');
if (imConn == this.markerConnection_) {
throw Error('Made it to connectMarker_ even though the marker isn\'t ' +
'changing');
}
// Render disconnected from everything else so that we have a valid
// connection location.

View File

@@ -35,10 +35,10 @@ goog.require('Blockly.VerticalFlyout');
goog.require('goog.events');
goog.require('goog.events.BrowserFeature');
goog.require('goog.events.EventType');
goog.require('goog.html.SafeHtml');
goog.require('goog.html.SafeStyle');
goog.require('goog.math.Rect');
goog.require('goog.style');
goog.require('goog.ui.tree.BaseNode');
goog.require('goog.ui.tree.TreeControl');
goog.require('goog.ui.tree.TreeNode');

View File

@@ -31,6 +31,8 @@
*/
goog.provide('Blockly.utils.uiMenu');
goog.require('goog.style');
/**
* Get the size of a rendered goog.ui.Menu.

View File

@@ -35,6 +35,7 @@ goog.provide('Blockly.utils');
goog.require('Blockly.userAgent');
goog.require('goog.math.Coordinate');
goog.require('goog.style');
/**