Merge pull request #135 from rschamp/filter-toolbox

Filter toolbox to blocks available to the VM
This commit is contained in:
Ray Schamp authored and GitHub committed 2017-02-28 14:00:30 -05:00
commit 6db7c75c5a
1 file changed
+2
+2
View File
@@ -25,6 +25,8 @@ class Blocks extends React.Component {
componentDidMount () {
const workspaceConfig = defaultsDeep({}, Blocks.defaultOptions, this.props.options);
this.workspace = this.ScratchBlocks.inject(this.blocks, workspaceConfig);
const filteredToolbox = this.props.vm.filterToolbox(this.workspace.options.languageTree);
this.workspace.updateToolbox(filteredToolbox);
this.attachVM();
}
componentWillUnmount () {