Custom properties on node [message #1807580] |
Tue, 04 June 2019 08:29 |
|
Hi, we are using ELK on server side and sprotty on client side to display dataflow using the Elk Layered algorithm.
We are planning to customize some display option like shape types, colors, etc. for different types of nodes, and add more information on that.
To do this, we need a way to "attach" more information on the server side when we create the dataflow.
There is a standard way to do this? Is possible to create some "custom properties" to store information that we can check on the client side?
Thank for help!
[Updated on: Tue, 04 June 2019 08:29] Report message to a moderator
|
|
|
|
Re: Custom properties on node [message #1808095 is a reply to message #1808094] |
Mon, 17 June 2019 12:12 |
|
Hi Miro, thank for answer.
Our system build graph on-the-fly.
The server representation of this is a graph and we want to represent it as a dataflow in the web application part.
We use ELK in the server part to layout the graph, then we send the result as ELK JSON to the web application that draw the SVG using sprotty.
We use websocket (with stomp)
We are trying to use the ELK label as complex string (type_of_node.id_of_node for example) to discriminate the different type of node and apply different styles on it. It work but is tricky.
How sprotty-server could help with this?
p.d. I attach a sample (small) of what we generate using sprotty (web part)
In it you can see different color that indicate if the node is waiting, is being processed or is yet calculated.
What we want is the possibility to attach more info (like the type of process or resource) and style them in different way.
[Updated on: Mon, 17 June 2019 12:15] Report message to a moderator
|
|
|
Re: Custom properties on node [message #1808974 is a reply to message #1808095] |
Fri, 05 July 2019 11:36 |
|
With sprotty-server you can transform your graphs to the sprotty model and use your own subclasses e.g. of SNode etc. to add custom properties. Then the client can render the elements differently depending on those properties.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04439 seconds