Fix "Connection UI Effect not playing on block connect"
This commit is contained in:
Rachel Fenichel
2017-06-29 15:13:56 -07:00
committed by GitHub
parent 8d0d5d8b46
commit de67108b17
2 changed files with 2 additions and 2 deletions

View File

@@ -912,7 +912,7 @@ Blockly.BlockSvg.disposeUiStep_ = function(clone, rtl, start, workspaceScale) {
* Play some UI effects (sound, ripple) after a connection has been established.
*/
Blockly.BlockSvg.prototype.connectionUiEffect = function() {
this.workspace.getAudioManger().play('click');
this.workspace.getAudioManager().play('click');
if (this.workspace.scale < 1) {
return; // Too small to care about visual effects.
}

View File

@@ -133,7 +133,7 @@ Blockly.DraggedConnectionManager.prototype.applyConnections = function() {
if (this.closestConnection_) {
// Connect two blocks together.
this.localConnection_.connect(this.closestConnection_);
if (this.rendered) {
if (this.topBlock_.rendered) {
// Trigger a connection animation.
// Determine which connection is inferior (lower in the source stack).
var inferiorConnection = this.localConnection_.isSuperior() ?