Merge pull request #135 from rschamp/filter-toolbox
Filter toolbox to blocks available to the VM
This commit is contained in:
commit
6db7c75c5a
1 file changed
+2
@@ -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 () {
|
||||
|
||||
Reference in new issue
Block a user