Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"gh-pages": "^0.12.0",
"highlightjs": "^9.8.0",
"htmlparser2": "3.9.2",
"jsdom": "^9.11.0",
"json": "^9.0.4",
"lodash.defaultsdeep": "4.6.0",
"minilog": "3.1.0",
Expand Down
5 changes: 0 additions & 5 deletions src/playground/playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ window.onload = function () {
});
window.workspace = workspace;

// Filter available blocks
var toolbox = vm.filterToolbox(workspace.options.languageTree);
// var toolbox = workspace.options.languageTree;
workspace.updateToolbox(toolbox);

// Attach scratch-blocks events to VM.
workspace.addChangeListener(vm.blockListener);
var flyoutWorkspace = workspace.getFlyout().getWorkspace();
Expand Down
53 changes: 0 additions & 53 deletions src/util/filter-toolbox.js

This file was deleted.

14 changes: 0 additions & 14 deletions src/virtual-machine.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var EventEmitter = require('events');
var util = require('util');

var filterToolbox = require('./util/filter-toolbox');
var Runtime = require('./engine/runtime');
var sb2import = require('./import/sb2import');

Expand Down Expand Up @@ -372,17 +371,4 @@ VirtualMachine.prototype.postSpriteInfo = function (data) {
this.editingTarget.postSpriteInfo(data);
};


/**
* Filter Blockly toolbox XML and return a copy which only contains blocks with
* existent opcodes. Categories with no valid children will be removed.
* @param {HTMLElement} toolbox Blockly toolbox XML node
* @returns {HTMLElement} filtered toolbox XML node
*/
VirtualMachine.prototype.filterToolbox = function (toolbox) {
var opcodes = Object.keys(this.runtime._primitives)
.concat(Object.keys(this.runtime._hats));
return filterToolbox(toolbox, opcodes);
};

module.exports = VirtualMachine;
5 changes: 0 additions & 5 deletions test/fixtures/.eslintrc.js

This file was deleted.

Loading