fix blockly resize on window resize

This commit is contained in:
Silver Kuusik 2018-08-18 22:56:14 +02:00
parent ddcc806c56
commit e07c24ded0

View File

@ -180,10 +180,11 @@ window.addEventListener('load', function() {
blocklyDiv.style.top = y + 'px';
blocklyDiv.style.width = blocklyArea.offsetWidth + 'px';
blocklyDiv.style.height = blocklyArea.offsetHeight + 'px';
// Resize the blockly svg
Blockly.svgResize(workspace);
};
window.addEventListener('resize', onresize, false);
onresize();
Blockly.svgResize(workspace);
// Retrieve the blocks
var code = getLocalStorageItem('sumorobot.blockly');