elk icon indicating copy to clipboard operation
elk copied to clipboard

HierarchyHandling problematic when directly using layout provider

Open uruuru opened this issue 8 years ago • 7 comments

There's a method in the RecursiveGraphLayoutEngine that explicitly computes and sets the hierarchyHandling layout option for all hierarchical nodes. This may be problematic when using a layout provider directly. The layout provider cannot really assume that the values have been set and would have to duplicate the logic.

private void evaluateHierarchyHandlingInheritance(final ElkNode layoutNode) { ... }

uruuru avatar Jul 20 '17 12:07 uruuru

We could put that logic into a public utility method which is then also used by the RecursiveGraphLayoutEngine?

le-cds avatar Jul 21 '17 07:07 le-cds

Who would call it in the case of plain java layout?

uruuru avatar Jul 22 '17 14:07 uruuru

Well, if the RecursiveGraphLayoutEngine is used the answer is rather obvious. If people call layout algorithms directly I think it's fine to require them to call said method beforehand. First, it's only really necessary if hierarchy is involved. And second, I don't really see why one would call a layout algorithm directly anyhow. And if it is indeed necessary, I guess we may safely assume people who do that to know what they're doing.

le-cds avatar Jul 23 '17 09:07 le-cds

Ok.

uruuru avatar Jul 28 '17 09:07 uruuru

We should evaluate how this relates to #314.

le-cds avatar Apr 27 '18 09:04 le-cds

It might make sense to move the hierarchy handling computation to LayoutAlgorithmResolver.

spoenemann avatar Apr 27 '18 09:04 spoenemann

Yes, we were thinking along those lines. Since that requires a bit of thought I don't expect that will happen for the next release.

le-cds avatar Apr 27 '18 11:04 le-cds