Merge pull request #151 from ilyabesk/clear_registered_types

Added function to clear all previously registered node types
This commit is contained in:
Javi Agenjo
2020-07-10 09:38:09 +02:00
committed by GitHub

View File

@@ -95,6 +95,16 @@
searchbox_extras: {}, //used to add extra features to the search box
/**
* Removes all previously registered node's types
*/
clearRegisteredTypes: function() {
this.registered_node_types = {};
this.node_types_by_file_extension = {};
this.Nodes = {};
this.searchbox_extras = {};
},
/**
* Register a node class so it can be listed when the user wants to create a new one
* @method registerNodeType