Frederik,
Feature request:
- Add a "label" property to shapes (paths)
- Give us a "set_label" node to set it
- Add option to the Sort shapes node to sort by label
When I draw a bunch of shapes in NodeBox I often spend much time and effort figuring out which one is which. I usually end up constructing tables with shape IDs and offsets to lists I have to make sure stay in the right order.
It would be much easier to just to set a label for every shape/path. I could then use the lookup and filter nodes to find and isolate the shapes I need at any given point. Many other possible uses come to mind.
I use "label" instead of "ID" because the value would not necessarily need to be unique. You could use it as an ID to identify a specific shape, but you could also use it to categorize shapes. Country shapes in a map could be labeled with their names (greatly simplifying the task of labeling a map) or with regions codes or population counts or any other dimension/category you want to color the map with. Boxes in an org chart could be labeled with person name or with rank or position code or whatever you want to highlight.
The ability to sort by label would be very handy for Sankey diagrams. When creating each anchor point you could label them with a link ID. Once you get all the start and end anchor shapes properly positioned, you just sort both lists by label and feed them into a link node. You could effortlessly create map indexes with country thumbnails listed in alphabetical order.
Tags would be more versatile than labels but also more complicated to use with lookup, filter, and sort nodes. If I wanted to assign multiple tags or values I could just label each shape and then build a tag table and do lookups using label as the key.
The more I think about this the more excited I become. This would be a hugely useful (and fairly easy to implement).
John