Fix inheritance on rendered connection.

Closure compiler on maximum compression breaks badly due to lack of
@extends attribute.
This commit is contained in:
Neil Fraser
2016-06-03 18:44:40 -07:00
parent f3a1ef464d
commit cf8ee673a9
2 changed files with 3 additions and 6 deletions

View File

@@ -516,8 +516,6 @@ Blockly.Connection.prototype.disconnectInternal_ = function(parentBlock,
/**
* Respawn the shadow block if there was one connected to the this connection.
* @return {Blockly.Block} The newly spawned shadow block, or null if none was
* spawned.
* @private
*/
Blockly.Connection.prototype.respawnShadow_ = function() {
@@ -533,9 +531,7 @@ Blockly.Connection.prototype.respawnShadow_ = function() {
} else {
throw 'Child block does not have output or previous statement.';
}
return blockShadow;
}
return null;
};
/**

View File

@@ -33,6 +33,7 @@ goog.require('Blockly.Connection');
* Class for a connection between blocks that may be rendered on screen.
* @param {!Blockly.Block} source The block establishing this connection.
* @param {number} type The type of the connection.
* @extends {Blockly.Connection}
* @constructor
*/
Blockly.RenderedConnection = function(source, type) {
@@ -334,8 +335,8 @@ Blockly.RenderedConnection.prototype.respawnShadow_ = function() {
// Respawn the shadow block if there is one.
var shadow = this.getShadowDom();
if (parentBlock.workspace && shadow && Blockly.Events.recordUndo) {
var blockShadow =
Blockly.RenderedConnection.superClass_.respawnShadow_.call(this);
Blockly.RenderedConnection.superClass_.respawnShadow_.call(this);
var blockShadow = this.targetBlock();
if (!blockShadow) {
throw 'Couldn\'t respawn the shadow block that should exist here.';
}