Skip to main content



      Home
Home » Modeling » Eclipse Layout Kernel » Unwanted child nodes resize(layout issue)
Unwanted child nodes resize [message #1766571] Fri, 23 June 2017 04:12 Go to next message
Eclipse UserFriend
Layouting my diagram using default arange all or any ELK layouts leads to unwanted nodes resize that are styled with this square.

index.php/fa/29772/0/

Is there a way to avoid this behavior ?

Noticed a SiriusDiagramUiInternalPreferencesKeys.PREF_AUTOSIZE_ON_ARRANGE pref which setting it to false didn't avoid the resize.

Any idea is welcome.
Re: Unwanted child nodes resize [message #1766573 is a reply to message #1766571] Fri, 23 June 2017 04:29 Go to previous messageGo to next message
Eclipse UserFriend
Hi Aurelien,

which size did they have at the start, and which size did they end up with after ELK layout?

Cheers,
Chris
Re: Unwanted child nodes resize [message #1766605 is a reply to message #1766573] Fri, 23 June 2017 08:19 Go to previous messageGo to next message
Eclipse UserFriend
size constantly increases of about 10px in height/width each layout invokation

[Updated on: Fri, 23 June 2017 08:46] by Moderator

Re: Unwanted child nodes resize [message #1766861 is a reply to message #1766605] Wed, 28 June 2017 06:42 Go to previous messageGo to next message
Eclipse UserFriend
Do you set any paddings on your nodes?
Re: Unwanted child nodes resize [message #1766875 is a reply to message #1766861] Wed, 28 June 2017 08:50 Go to previous message
Eclipse UserFriend
Here are my option and invocation (using ElkPadding) :

DiagramLayoutEngine.Parameters params = new DiagramLayoutEngine.Parameters();

params.getGlobalSettings()

.setProperty(CoreOptions.ANIMATE, animation)
.setProperty(CoreOptions.LAYOUT_ANCESTORS, false)
.setProperty(CoreOptions.NODE_SIZE_MINIMUM, new KVector(100d, 50d))
.setProperty(CoreOptions.NODE_SIZE_CONSTRAINTS, SizeConstraint.fixed())
.setProperty(CoreOptions.HIERARCHY_HANDLING, HierarchyHandling.INCLUDE_CHILDREN)
.setProperty(CoreOptions.NODE_SIZE_OPTIONS, EnumSet.of(SizeOptions.DEFAULT_MINIMUM_SIZE))
.setProperty(CoreOptions.PROGRESS_BAR, progressDialog)
.setProperty(CoreOptions.ZOOM_TO_FIT, zoomToFit)
.setProperty(CoreOptions.PADDING, new ElkPadding(24, 12, 12, 12))
.setProperty(CoreOptions.ALGORITHM, "org.eclipse.elk.layered.layered")
;

params.addLayoutRun().configure(ElkNode.class)


.setProperty(LayeredOptionsOpt1.SPACING_NODE_NODE, 10d)
.setProperty(LayeredOptionsOpt1.DIRECTION, Direction.RIGHT)
.setProperty(LayeredOptionsOpt1.EDGE_THICKNESS, 10d)
.setProperty(LayeredOptionsOpt1.LAYERING_STRATEGY, LayeringStrategy.NETWORK_SIMPLEX)
.setProperty(LayeredOptionsOpt1.COMPACTION_CONNECTED_COMPONENTS, true)
.setProperty(LayeredOptionsOpt1.EDGE_ROUTING, EdgeRouting.ORTHOGONAL)
.setProperty(LayeredOptionsOpt1.PADDING, new ElkPadding(24, 12, 12, 12))
.setProperty(LayeredOptionsOpt1.LAYERING_NODE_PROMOTION_STRATEGY, NodePromotionStrategy.NONE)
.setProperty(LayeredOptionsOpt1.NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY, NodeFlexibility.NONE)
.setProperty(LayeredOptionsOpt1.NODE_SIZE_CONSTRAINTS, SizeConstraint.fixed())
.setProperty(LayeredOptionsOpt1.NODE_SIZE_OPTIONS, EnumSet.of(SizeOptions.DEFAULT_MINIMUM_SIZE))
.setProperty(LayeredOptionsOpt1.PORT_BORDER_OFFSET, 0d)
.setProperty(LayeredOptionsOpt1.SPACING_COMPONENT_COMPONENT, 0d)
.setProperty(LayeredOptionsOpt1.SPACING_NODE_NODE, 0d)
.setProperty(LayeredOptionsOpt1.BOX_PACKING_MODE, PackingMode.SIMPLE)
.setProperty(LayeredOptionsOpt1.LAYERING_LAYER_CONSTRAINT, LayerConstraint.NONE)
.setProperty(LayeredOptionsOpt1.PORT_LABELS_PLACEMENT, PortLabelPlacement.INSIDE)
;

DiagramLayoutEngine.invokeLayout(editorPart, diagramPart, null, params);
Previous Topic:Feature of adding custom processors in existing layouting algorithms
Next Topic:Two-step undo for Sirius
Goto Forum:
  


Current Time: Fri May 16 20:31:00 EDT 2025

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

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

Back to the top