elk
elk copied to clipboard
FIXED_SIDE and FIXED_POS ports throw exception when defined on hierarchical node of 2 levels of nesting
Using thelayered
algo with elkjs.
The graph has deep nesting of nodes inside nodes.
Problem reproduces on [email protected]
and [email protected]
On level 2 root.children[*].children[*].layoutData
, if I define the option
'elk.portConstraints': 'FIXED_POS'
or 'elk.portConstraints': 'FIXED_ORDER'
,
elk will throw exception:
TypeError: Cannot read properties of null (reading 'x_0')
at createExternalPortDummy (elk-worker.js:31762:1)
at $transformHierarchyEdges (elk-worker.js:30937:1)
at $transformHierarchyEdges (elk-worker.js:30927:1)
at $process_1 (elk-worker.js:30774:1)
at $doCompoundLayout (elk-worker.js:27705:1)
at LayeredLayoutProvider.layout_2 [as layout] (elk-worker.js:28027:1)
at $executeAlgorithm (elk-worker.js:61782:1)
at $layoutRecursively (elk-worker.js:61872:1)
at $layout_3 (elk-worker.js:61817:1)
at layout_11 (elk-worker.js:74016:1)
at Dispatcher.dispatch (elk-worker.js:73945:1)
at Dispatcher.saveDispatch (elk-worker.js:73953:1)
at elk-worker.js:73970:1
Here's the demo reproducing the problem
The problem reproduces after adding the option on group_1
but not when it's on group_2
.
More info is in the discussion here: https://github.com/kieler/elkjs/issues/162