Commit 6f9b2373 authored by neil.fraser@gmail.com's avatar neil.fraser@gmail.com

Prevent undeletable blocks from being deleted in mutator.

git-svn-id: http://blockly.googlecode.com/svn/trunk@1737 c400ca83-b69d-9dd7-9705-49c6b8615e23
parent f1e7faba
......@@ -255,8 +255,9 @@ Blockly.Mutator.prototype.workspaceChanged_ = function() {
for (var b = 0, block; block = blocks[b]; b++) {
var blockXY = block.getRelativeToSurfaceXY();
var blockHW = block.getHeightWidth();
if (Blockly.RTL ? blockXY.x > -this.flyout_.width_ + MARGIN :
blockXY.x < this.flyout_.width_ - MARGIN) {
if (block.isDeletable() && (Blockly.RTL ?
blockXY.x > -this.flyout_.width_ + MARGIN :
blockXY.x < this.flyout_.width_ - MARGIN)) {
// Delete any block that's sitting on top of the flyout.
block.dispose(false, true);
} else if (blockXY.y + blockHW.height < MARGIN) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment