Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Eclipse Layout Kernel » Custom properties on node
Custom properties on node [message #1807580] Tue, 04 June 2019 08:29 Go to next message
Enrico Girotto is currently offline Enrico GirottoFriend
Messages: 6
Registered: November 2018
Junior Member
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 #1808094 is a reply to message #1807580] Mon, 17 June 2019 11:35 Go to previous messageGo to next message
Miro Spönemann is currently offline Miro SpönemannFriend
Messages: 78
Registered: March 2015
Location: Kiel, Germany
Member

What kind of messages and data structures are you exchanging between client and server? Aren't you using sprotty-server?
Re: Custom properties on node [message #1808095 is a reply to message #1808094] Mon, 17 June 2019 12:12 Go to previous messageGo to next message
Enrico Girotto is currently offline Enrico GirottoFriend
Messages: 6
Registered: November 2018
Junior Member
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 Go to previous messageGo to next message
Miro Spönemann is currently offline Miro SpönemannFriend
Messages: 78
Registered: March 2015
Location: Kiel, Germany
Member

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.
Re: Custom properties on node [message #1809157 is a reply to message #1808974] Wed, 10 July 2019 10:03 Go to previous message
Enrico Girotto is currently offline Enrico GirottoFriend
Messages: 6
Registered: November 2018
Junior Member
This is what i'm doing in the client part passing the properties from our server using the label.
We will try to see how to integrate the sprotty-server library.
Thank you very much for help
Previous Topic:Run time function
Next Topic:How to avoid edge overlap
Goto Forum:
  


Current Time: Sat Oct 12 12:57:53 GMT 2024

Powered by FUDForum. Page generated in 0.04439 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top