components/blockly-src/blocks/logic.js
function(e) {
    var blockA = this.getInputTargetBlock('A');
    var blockB = this.getInputTargetBlock('B');
    // Disconnect blocks that existed prior to this change if they don't match.
    if (blockA && blockB &&
        !blockA.outputConnection.checkType_(blockB.outputConnection)) {
      // Mismatch between two inputs.  Disconnect previous and bump it away.
      // Ensure that any disconnections are grouped with the causing event.
      Blockly.Events.setGroup(e.group);
      for (var i = 0; i < this.prevBlocks_.length; i++) {
        var block = this.prevBlocks_[i];
        if (block === blockA || block === blockB) {
          block.unplug();
          block.bumpNeighbours_();
        }
      }
      Blockly.Events.setGroup(false);
    }
    this.prevBlocks_[0] = blockA;
    this.prevBlocks_[1] = blockB;
  }
function(e) {
    var blockA = this.getInputTargetBlock('A');
    var blockB = this.getInputTargetBlock('B');
    // Disconnect blocks that existed prior to this change if they don't match.
    if (blockA && blockB &&
        !blockA.outputConnection.checkType_(blockB.outputConnection)) {
      // Mismatch between two inputs.  Disconnect previous and bump it away.
      // Ensure that any disconnections are grouped with the causing event.
      Blockly.Events.setGroup(e.group);
      for (var i = 0; i < this.prevBlocks_.length; i++) {
        var block = this.prevBlocks_[i];
        if (block === blockA || block === blockB) {
          block.unplug();
          block.bumpNeighbours_();
        }
      }
      Blockly.Events.setGroup(false);
    }
    this.prevBlocks_[0] = blockA;
    this.prevBlocks_[1] = blockB;
  }
function ( e ) { var blockA = this . getInputTargetBlock ( 'A' ) ; var blockB = this . getInputTargetBlock ( 'B' ) ; // Disconnect blocks that existed prior to this change if they don't match. if ( blockA && blockB && ! blockA . outputConnection . checkType_ ( blockB . outputConnection ) ) { // Mismatch between two inputs.  Disconnect previous and bump it away. // Ensure that any disconnections are grouped with the causing event. Blockly . Events . setGroup ( e . group ) ; for ( var i = 0 ; i < this . prevBlocks_ . length ; i ++ ) { var block = this . prevBlocks_ [ i ] ; if ( block === blockA || block === blockB ) { block . unplug ( ) ; block . bumpNeighbours_ ( ) ; } } Blockly . Events . setGroup ( false ) ; } this . prevBlocks_ [ 0 ] = blockA ; this . prevBlocks_ [ 1 ] = blockB ; }
Called whenever anything on the workspace changes.
Prevent mismatched types from being compared.
@param {!Blockly.Events.Abstract} e Change event.
@this Blockly.Block
Called whenever anything on the workspace changes . Prevent mismatched types from being compared .