forked from marva/sumorobot-web
fix blockly resize on window resize
This commit is contained in:
parent
ddcc806c56
commit
e07c24ded0
@ -180,10 +180,11 @@ window.addEventListener('load', function() {
|
|||||||
blocklyDiv.style.top = y + 'px';
|
blocklyDiv.style.top = y + 'px';
|
||||||
blocklyDiv.style.width = blocklyArea.offsetWidth + 'px';
|
blocklyDiv.style.width = blocklyArea.offsetWidth + 'px';
|
||||||
blocklyDiv.style.height = blocklyArea.offsetHeight + 'px';
|
blocklyDiv.style.height = blocklyArea.offsetHeight + 'px';
|
||||||
|
// Resize the blockly svg
|
||||||
|
Blockly.svgResize(workspace);
|
||||||
};
|
};
|
||||||
window.addEventListener('resize', onresize, false);
|
window.addEventListener('resize', onresize, false);
|
||||||
onresize();
|
onresize();
|
||||||
Blockly.svgResize(workspace);
|
|
||||||
|
|
||||||
// Retrieve the blocks
|
// Retrieve the blocks
|
||||||
var code = getLocalStorageItem('sumorobot.blockly');
|
var code = getLocalStorageItem('sumorobot.blockly');
|
||||||
|
Loading…
Reference in New Issue
Block a user