Merge pull request #557 from drigz/bugfix/headless-render

Don't call SVG methods on headless workspaces
This commit is contained in:
rachel-fenichel 2016-08-09 11:10:52 -07:00 committed by GitHub
commit e0068cab41

View file

@ -355,11 +355,11 @@ Blockly.Xml.domToBlock = function(xmlBlock, workspace) {
}
}, 1);
}
topBlock.updateDisabled();
// Allow the scrollbars to resize and move based on the new contents.
// TODO(@picklesrus): #387. Remove when domToBlock avoids resizing.
Blockly.resizeSvgContents(workspace);
}
topBlock.updateDisabled();
// Allow the scrollbars to resize and move based on the new contents.
// TODO(@picklesrus): #387. Remove when domToBlock avoids resizing.
Blockly.resizeSvgContents(workspace);
} finally {
Blockly.Events.enable();
}