Is it possible to change the color of wires ?
Would be nice to make different types of information flow visible in the flow.
First, just to get it out of the way. The editor is not meant to be a dashboard
You can use themes to change the CSS of the editor to statically change the colour of any element in the editor, but no you can not dynamically change the colour of things. (Also this would put a huge load on the system as it had to push updates from the back end to the browser for EVERY message in the the system)
Hi @stefaanv
on the more general point about being able to statically set the colour of a wire (rather than doing any dynamic behaviour), it is not possible to do.
As it stands, there is no object in the flow file that represents a wire, so there is nowhere to store any metadata/properties (such as colour) about the wire.
Whilst we could change the format to support that type of thing, it would not be possible to do in a way that would be backward compatible. That type of breaking change to the flow file format is something we cannot do lightly as it would have a huge impact.
@stefaanv
I understand what your trying to do you have things crossing making it a little difficult to track one process in your flow.
my 2 cents , Use link in and link out nodes to cut some long lines out .
also try to keep a proccess grouped together. (im constantly rearranging to keep it clean looking)
my favorite part. you can group a bunch of nodes together in a box you can label it and you can change its background color.
look at my photo example you can see how i grouped nodes and then changed the background of the grouping. also able to name them.
these may be your best option because the lines that are created when 2 nodes are linked together cannot be changed.
@all Thanks to you all for the fast answers.
@hardillb, I was refering to static coloring in the way knolleary has interpreted my question. Sorry for not being more clear.
I'm using the link-in
and link-out
nodes but having colors would help in adding visual category to certain information stream. For instance, in an energy management simulation,one could have different color wires for
- Houskeeping info (like simulation
tick
andreset
signals used by many nodes) - Energy production streams
- Energy consumption streams
These stream cannot be separated - the housekeeping wires all all over the place, production and consumption will have to come together somewhere and your really want them on one flow.
@knolleary the flows are stored in JSON format, would the older versions not simply overlook new added information ?
@knolleary the flows are stored in JSON format, would the older versions not simply overlook new added information ?
The important part of Nick's earlier answer is
As it stands, there is no object in the flow file that represents a wire, so there is nowhere to store any metadata/properties (such as colour) about the wire.
There is no where to put the colour value, wires are stored as just a list of end node ids.
@hardillb
I appreciate the developer resource limitations that we all have but I don't understand how this can be a technical problem.
Here's some technical solutions
Option 1
Add a version number object to the JSON file and change the wires
list from strings into objects.
This will obviously break higher-to-lower version flow exchange compatibility.
[
{
"id": "2d6d37bac026bd99",
"type": "data_version",
"info": "4"
},
{
"id": "e0be297033d2933a",
"type": "link in",
"z": "a825c676be3d2c0c",
"name": "reset",
"links": ["2236cee4c2ec9df3"],
"x": 45,
"y": 100,
"wires": [
[
{ "connectsToNode": "3cf6a51fe81d9024", "wireClass": "MyWireClass1" },
{ "connectsToNode": "1ec1baff0e790640", "wireClass": "MyWireClass2" }
]
]
},
...
Option 2
Add an extra property to the node object
This is not nice from a data architecture point of view but it should work
[
{
"id": "f4c95fe928a48e39",
"type": "link in",
"z": "a825c676be3d2c0c",
"name": "time",
"links": ["78de3bf20909d824"],
"x": 235,
"y": 380,
"wires": [["a760fb207fedaabf"],["03f510556812224f"]],
"wiresClasses": [["MyWireClass1"],["MyWireClass2"]]
},
...
]
Option 3 (my favorite)
Add extra wire
objects
This is very similar to how junction
s are stored in the JSON file
...
{
"id": "a5f411dde337aa14",
"type": "wire",
"from": "78de3bf20909d824",
"to": "a9561f59610698b7",
"wireClass": "MyWireClass1"
},
...
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.