Fix mutator toolbox ordering with block canvas

This is cherry-picked code from f3c10d4ea. When merged with Google's
master there will be a conflict that will need to be resolved.
This commit is contained in:
Evan W. Patton
2017-05-16 18:44:07 -04:00
parent 144b7f4261
commit 35881a7a98

View File

@@ -137,7 +137,12 @@ Blockly.Mutator.prototype.createEditor_ = function() {
// To fix this, scale needs to be applied at a different level in the dom.
var flyoutSvg = this.workspace_.addFlyout_('g');
var background = this.workspace_.createDom('blocklyMutatorBackground');
background.appendChild(flyoutSvg);
// cherry-picked code from Blockly master commit f3c10d4ea
// Insert the flyout after the <rect> but before the block canvas so that
// the flyout is underneath in z-order. This makes blocks layering during
// dragging work properly.
background.insertBefore(flyoutSvg, this.workspace_.svgBlockCanvas_);
this.svgDialog_.appendChild(background);
return this.svgDialog_;