Fix #1959 by calling bring to front when a block drag starts inside a mutator. (#2013)

This commit is contained in:
picklesrus
2018-08-21 12:51:43 -07:00
committed by GitHub
parent a8bb9091bb
commit 962fcd5c2e

View File

@@ -152,6 +152,13 @@ Blockly.BlockDragger.prototype.startBlockDrag = function(currentDragDeltaXY, hea
Blockly.Events.setGroup(true);
}
// Mutators don't have the same type of z-ordering as the normal workspace during a drag.
// They have to rely on the order of the blocks in the svg. For performance reasons that
// usually happens at the end of a drag, but do it at the beginning for mutators.
if (this.workspace_.isMutator) {
this.draggingBlock_.bringToFront();
}
this.workspace_.setResizesEnabled(false);
Blockly.BlockAnimations.disconnectUiStop();