Dispose of toolbox when workspace is disposed.

This commit is contained in:
Neil Fraser
2015-06-04 12:04:43 -07:00
parent af056f9028
commit 8202ebf07d
6 changed files with 69 additions and 54 deletions

View File

@@ -81,7 +81,8 @@
<script>
var workspace = Blockly.inject('blocklyDiv',
{media: '../../media/',
maxBlocks: 5, toolbox: document.getElementById('toolbox')});
maxBlocks: 5,
toolbox: document.getElementById('toolbox')});
function onchange() {
document.getElementById('capacity').innerHTML = workspace.remainingCapacity();