Commit 8fb16b61 authored by Neil Fraser's avatar Neil Fraser

Simplify Block factory init.

parent 90e3ccb2
......@@ -771,11 +771,8 @@ function init() {
BlocklyStorage.retrieveXml(window.location.hash.substring(1),
mainWorkspace);
} else {
var rootBlock = Blockly.Block.obtain(mainWorkspace, 'factory_base');
rootBlock.initSvg();
rootBlock.render();
rootBlock.setMovable(false);
rootBlock.setDeletable(false);
var xml = '<xml><block type="factory_base" deletable="false" movable="false"></block></xml>';
Blockly.Xml.domToWorkspace(mainWorkspace, Blockly.Xml.textToDom(xml));
}
mainWorkspace.addChangeListener(updateLanguage);
......
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