Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Katelyn Mann
2017-03-22 14:24:28 -07:00
2 changed files with 11 additions and 6 deletions

View File

@@ -1185,6 +1185,17 @@ Blockly.Flyout.prototype.createBlockFunc_ = function(originBlock) {
} else {
flyout.filterForCapacity_();
}
// Re-render the blocks before starting the drag:
// Force a render on IE and Edge to get around the issue described in
// Blockly.Field.getCachedWidth
if (goog.userAgent.IE || goog.userAgent.EDGE) {
var blocks = block.getDescendants();
for (var i = blocks.length - 1; i >= 0; i--) {
blocks[i].render(false);
}
}
// Start a dragging operation on the new block.
block.onMouseDown_(e);
Blockly.dragMode_ = Blockly.DRAG_FREE;

View File

@@ -32,7 +32,6 @@ goog.provide('Blockly.Xml');
goog.require('goog.asserts');
goog.require('goog.dom');
goog.require('goog.userAgent');
/**
@@ -430,11 +429,6 @@ Blockly.Xml.domToBlock = function(xmlBlock, workspace) {
setTimeout(function() {
if (topBlock.workspace) { // Check that the block hasn't been deleted.
topBlock.setConnectionsHidden(false);
// Force a render on IE and Edge to get around the issue described in
// Blockly.Field.getCachedWidth
if (goog.userAgent.IE || goog.userAgent.EDGE) {
topBlock.render();
}
}
}, 1);
topBlock.updateDisabled();