Added function to clear all previously registered node types

This commit is contained in:
ilyabeskrovniy
2020-07-07 10:32:28 +03:00
parent 6ac6948609
commit 44f58d03e1

View File

@@ -94,6 +94,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