mirror of
https://github.com/google/blockly.git
synced 2026-01-27 10:40:09 +01:00
Minor cleanup
This commit is contained in:
@@ -162,9 +162,9 @@ Blockly.BlockDragger.prototype.startBlockDrag = function(currentDragDeltaXY,
|
||||
this.draggingBlock_.bringToFront();
|
||||
}
|
||||
|
||||
// // During a drag there may be a lot of rerenders, but not field changes.
|
||||
// // Turn the cache on so we don't do spurious remeasures during the drag.
|
||||
// Blockly.Field.startCache();
|
||||
// During a drag there may be a lot of rerenders, but not field changes.
|
||||
// Turn the cache on so we don't do spurious remeasures during the drag.
|
||||
Blockly.Field.startCache();
|
||||
this.workspace_.setResizesEnabled(false);
|
||||
Blockly.BlockAnimations.disconnectUiStop();
|
||||
|
||||
|
||||
@@ -391,8 +391,6 @@ Blockly.BlockSvg.prototype.renderFields_ = function(fieldList,
|
||||
root.setAttribute('display', 'none');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return this.RTL ? -cursorX : cursorX;
|
||||
};
|
||||
|
||||
|
||||
@@ -431,6 +431,16 @@ Blockly.Connection.prototype.isConnectionAllowed = function(candidate) {
|
||||
break;
|
||||
}
|
||||
case Blockly.NEXT_STATEMENT: {
|
||||
// Don't let a block with no next connection bump other blocks out of the
|
||||
// stack. But covering up a shadow block or stack of shadow blocks is
|
||||
// fine. Similarly, replacing a terminal statement with another terminal
|
||||
// statement is allowed.
|
||||
if (candidate.isConnected() &&
|
||||
!this.sourceBlock_.nextConnection &&
|
||||
!candidate.targetBlock().isShadow() &&
|
||||
candidate.targetBlock().nextConnection) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user