elkjs
elkjs copied to clipboard
Get mystic error when rendering with layered algorithm
I'm using elkjs with react to write an App in which user can add nodes interactively, the app crash occasionally when adding about more than 50 nodes. The ELK version: elkjs": "^0.8.2", the config option:
"elk.algorithm": 'layered',
"layering.strategy": "BF_MODEL_ORDER",
"elk.direction": direction,
"nodePlacement.strategy": "BRANDES_KOEPF", /
"spacing.edgeNodeBetweenLayers": 15,
'elk.layered.nodePlacement.bk.fixedAlignment': 'BALANCED',
'elk.layered.crossingMinimization.forceNodeModelOrder': 'false',
'considerModelOrder.strategy': 'NODES_AND_EDGES'
The error message:
elk-worker.min.js:3668 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'he')
at Xpd (elk-worker.min.js:3668:52)
at hrd (elk-worker.min.js:5069:130)
at drd (elk-worker.min.js:5106:124)
at lqd (elk-worker.min.js:4729:155)
at Zqd (elk-worker.min.js:3907:75)
at drd (elk-worker.min.js:5106:202)
at qvd (elk-worker.min.js:5776:142)
at h.dispatch (elk-worker.min.js:6081:473)
at h.saveDispatch (elk-worker.min.js:6081:603)
at elk-worker.min.js:6082:162
Xpd @ elk-worker.min.js:3668
hrd @ elk-worker.min.js:5069
drd @ elk-worker.min.js:5106
lqd @ elk-worker.min.js:4729
Zqd @ elk-worker.min.js:3907
drd @ elk-worker.min.js:5106
qvd @ elk-worker.min.js:5776
dispatch @ elk-worker.min.js:6081
saveDispatch @ elk-worker.min.js:6081
(anonymous) @ elk-worker.min.js:6082
await in (anonymous) (async)
Hi, did you manage to find a solution?
Same error !
@RemiKalbe How do you use elkjs? Do you use it as specified in the readme or differently.
@RemiKalbe @hovik-geodakyan I had a really similar error that was caused by the nodes I passed in not having a width/height. Adding a fallback width/height fixed the issue.