You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to render a graph using the combo-combined layout, and I get an error when the number of combos is exactly 1. outerPositions is never calculated, so outerPositions.nodes.find() does not exist.
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'nodes')
at chunk-ERQFASD5.js?v=e9fd4546:50194:48
at Map.forEach (<anonymous>)
at ComboCombinedLayout.<anonymous> (chunk-ERQFASD5.js?v=e9fd4546:50192:20)
at Generator.next (<anonymous>)
at fulfilled (tslib.es6.mjs:118:56)
in combo-combined.js a value for outerPositions is only yield'd when outerLayoutNodes.length !== 1:
code:
if(outerLayoutNodes.length===1){outerLayoutNodes[0].data.x=center[0];outerLayoutNodes[0].data.y=center[1];}else{constouterLayoutGraph=newGraphCore({nodes: outerLayoutNodes,edges: outerLayoutEdges,});constouterLayout=propsOuterLayout||newForceLayout();// preset the nodes if the outerLayout is a force family layoutif(allHaveNoPosition&&FORCE_LAYOUT_TYPE_MAP[outerLayout.id]){constouterLayoutPreset=outerLayoutNodes.length<100
? newMDSLayout()
: newConcentricLayout();yieldouterLayoutPreset.assign(outerLayoutGraph);}constoptions=Object.assign({ center,kg: 5,preventOverlap: true,animate: false},(outerLayout.id==='force'
? {gravity: 1,factor: 4,linkDistance: (edge,source,target)=>{constsourceSize=Math.max(...source.data.size)||32;consttargetSize=Math.max(...target.data.size)||32;returnsourceSize/2+targetSize/2+200;},}
: {}));
--> outerPositions = yield executeLayout(outerLayout, outerLayoutGraph, options);
}
Describe the bug / 问题描述
I am attempting to render a graph using the
combo-combined
layout, and I get an error when the number of combos is exactly 1.outerPositions
is never calculated, soouterPositions.nodes.find()
does not exist.in combo-combined.js a value for
outerPositions
is onlyyield
'd whenouterLayoutNodes.length !== 1
:code:
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
layout:
combos:
nodes:
Version / 版本
Please select / 请选择
OS / 操作系统
Browser / 浏览器
The text was updated successfully, but these errors were encountered: