mirror of
https://github.com/google/blockly.git
synced 2026-01-23 16:50:10 +01:00
Fix require statements.
Also throw error instead of string. And stop using goog.asserts.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
*/
|
||||
goog.provide('Blockly.utils.uiMenu');
|
||||
|
||||
goog.require('goog.style');
|
||||
|
||||
|
||||
/**
|
||||
* Get the size of a rendered goog.ui.Menu.
|
||||
|
||||
@@ -35,6 +35,7 @@ goog.provide('Blockly.utils');
|
||||
goog.require('Blockly.userAgent');
|
||||
|
||||
goog.require('goog.math.Coordinate');
|
||||
goog.require('goog.style');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user