Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Eclipse Layout Kernel » Optimizing/making shorter connections in a graph(Some connections are made unnecessary long)
Optimizing/making shorter connections in a graph [message #1717497] Mon, 14 December 2015 11:43 Go to next message
Mindaugas Laganeckas is currently offline Mindaugas LaganeckasFriend
Messages: 7
Registered: May 2012
Junior Member
Hi everyone,

Please, see the attached image.

Is there any setting in ELK, that could make the connection in the red rectangle shorter? We have many of this kind connections in our graph.

Thanks for your help!
Re: Optimizing/making shorter connections in a graph [message #1717833 is a reply to message #1717497] Thu, 17 December 2015 07:47 Go to previous messageGo to next message
Mindaugas Laganeckas is currently offline Mindaugas LaganeckasFriend
Messages: 7
Registered: May 2012
Junior Member
Dear all,

A post above was my first in eclipse forum. I was so exited about it so I forgot my manners Smile

The ELK version: 0.1.0.201512040302
We are using Graphiti: 0.12.1.v20150916-0905

We have to make changes to ELK - Graphiti integration. The only change:
@Override
protected KNode createNode(final LayoutMapping<PictogramElement> mapping, final KNode parentNode, final Shape shape) {

final KNode node = super.createNode(mapping, parentNode, shape);
final KShapeLayout nodeLayout = node.getData(KShapeLayout.class);
nodeLayout.setProperty(LayoutOptions.DIRECTION, Direction.DOWN);
nodeLayout.setProperty(LayoutOptions.LAYOUT_HIERARCHY, true);

return node;
}
The rest of the configuration (layout algorithm etc) is default.
Hopefully, this time all information is available.

Thanks!
Re: Optimizing/making shorter connections in a graph [message #1719514 is a reply to message #1717833] Fri, 08 January 2016 14:27 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 46
Registered: September 2015
Member
Hi,

sorry for the late reply. Try changing the node placement algorithm on all parent nodes by setting the following property:

parentNode.setProperty(Properties.NODE_PLACER, NodePlacementStrategy.BRANDES_KOEPF);


Check if that helps.
Re: Optimizing/making shorter connections in a graph [message #1719920 is a reply to message #1719514] Wed, 13 January 2016 08:30 Go to previous message
Mindaugas Laganeckas is currently offline Mindaugas LaganeckasFriend
Messages: 7
Registered: May 2012
Junior Member
Hi Christoph,

Thanks for your help!

[Updated on: Wed, 13 January 2016 13:38]

Report message to a moderator

Previous Topic:Welcome to eclipse.elk
Next Topic:Static Configuration
Goto Forum:
  


Current Time: Mon May 28 01:44:07 GMT 2018

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

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

Back to the top