Skip to content

Commit b03768c

Browse files
authored
Remove filter toolbox utility (#496)
* Revert "Merge pull request #486 from rschamp/fix-filter-tests" This reverts commit ba00db8, reversing changes made to 739c5de. * Revert "Show Categories that use custom code to load (variables, procedures) (#483)" This reverts commit 739c5de. * Revert "Merge pull request #461 from rschamp/filter-toolbox" This reverts commit 343b5bf, reversing changes made to 370f2c6.
1 parent 2ebb112 commit b03768c

File tree

7 files changed

+0
-940
lines changed

7 files changed

+0
-940
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"gh-pages": "^0.12.0",
3434
"highlightjs": "^9.8.0",
3535
"htmlparser2": "3.9.2",
36-
"jsdom": "^9.11.0",
3736
"json": "^9.0.4",
3837
"lodash.defaultsdeep": "4.6.0",
3938
"minilog": "3.1.0",

src/playground/playground.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ window.onload = function () {
5959
});
6060
window.workspace = workspace;
6161

62-
// Filter available blocks
63-
var toolbox = vm.filterToolbox(workspace.options.languageTree);
64-
// var toolbox = workspace.options.languageTree;
65-
workspace.updateToolbox(toolbox);
66-
6762
// Attach scratch-blocks events to VM.
6863
workspace.addChangeListener(vm.blockListener);
6964
var flyoutWorkspace = workspace.getFlyout().getWorkspace();

src/util/filter-toolbox.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/virtual-machine.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
var EventEmitter = require('events');
22
var util = require('util');
33

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

@@ -372,17 +371,4 @@ VirtualMachine.prototype.postSpriteInfo = function (data) {
372371
this.editingTarget.postSpriteInfo(data);
373372
};
374373

375-
376-
/**
377-
* Filter Blockly toolbox XML and return a copy which only contains blocks with
378-
* existent opcodes. Categories with no valid children will be removed.
379-
* @param {HTMLElement} toolbox Blockly toolbox XML node
380-
* @returns {HTMLElement} filtered toolbox XML node
381-
*/
382-
VirtualMachine.prototype.filterToolbox = function (toolbox) {
383-
var opcodes = Object.keys(this.runtime._primitives)
384-
.concat(Object.keys(this.runtime._hats));
385-
return filterToolbox(toolbox, opcodes);
386-
};
387-
388374
module.exports = VirtualMachine;

test/fixtures/.eslintrc.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)