Enhancement: add a label to nodes in the graph
micbuffa opened this issue · 3 comments
With big graphs it could be useful to be able to click on some nodes in the graphic view of the graph, and add labels. LocalStorage could be use to save/load the mapping.
Or maybe color (or add a border color) the nodes belonging to some "logical modules in the webaudio app".
Food for thought (not meant to discourage at all!): I wonder how labels would stay attached to nodes across page refreshes for graphs that vary for each reload. Today, the ID unique to each AudioNode is generated based on order of construction. For instance, a web app could construct portions of the graph based on the order in which network requests complete.
I like labels/tags though. I wonder if it would be help if the extension defined a global __label_node__([node object], "string label") method as well as a __set_label_color__("label string", "color string") method. Then, developers (users) could label AudioNodes in their own code when the app is accessed in say debug mode (and when the code detects the extension is installed). The panel UI would then color nodes by label. This mimics how some Google products have a debug mode that exhibits special logging behavior when accessed internally.
To be clear, my thoughts might be a departure from your original proposal - feel free to disagree/agree. :) Just brainstorming.
Let me know if you want to take on this bug. I will likely tackle it after fixing some key issues, ie support for ES6 classes, but that may take a while.