mirror of
https://github.com/google/blockly.git
synced 2026-03-10 15:20:16 +01:00
Fixed next blocks not being disabled in flyout. (#2278)
This commit is contained in:
@@ -740,8 +740,12 @@ Blockly.Flyout.prototype.filterForCapacity_ = function() {
|
||||
var blocks = this.workspace_.getTopBlocks(false);
|
||||
for (var i = 0, block; block = blocks[i]; i++) {
|
||||
if (this.permanentlyDisabled_.indexOf(block) == -1) {
|
||||
block.setDisabled(!this.targetWorkspace_
|
||||
.isCapacityAvailable(Blockly.utils.getBlockTypeCounts(block)));
|
||||
var disable = !this.targetWorkspace_
|
||||
.isCapacityAvailable(Blockly.utils.getBlockTypeCounts(block));
|
||||
while (block) {
|
||||
block.setDisabled(disable);
|
||||
block = block.getNextBlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user