How do I create a new object in javascript based on a variable type-string (containing the name of the object)?
Now I have: (with more tools coming the list will get lon
You should consider rethinking your approach. It would be better to have something like a Tools object, which would have the tools as properties, like
Tools
Tools = {"SelectTool": SelectTool /* etc */}`.
This way, you could access the tools both as new Tools.SelectTool and new Tools[var_with_tool_name].
new Tools.SelectTool
new Tools[var_with_tool_name]