mirror of
https://github.com/google/blockly.git
synced 2026-03-10 07:10:11 +01:00
Fix inheritance on rendered connection.
Closure compiler on maximum compression breaks badly due to lack of @extends attribute.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user